# Finish the beautiful, ten story tower

A mathematician has commissioned you to build a beautiful tower, ten stories tall, and it's almost complete!
Here are the number of bricks in each level, and the layout of the steel girders.
Exactly how many bricks do the incomplete levels require and why?
*Note: Replace each '?' with a single digit.

Bonus Hidden Beauty Challenge (optional):
Without changing any integer values or the floor they are on, turn the tower into gold (9). (multiple essentially equivalent solutions).

Text version:

• 30
• 200003000
• 420000
• 1100
• ?1003010
• 300002
• 1000
• ??000000
• 100000
• 30

Hint:

No complicated math required. Look for a simple, logical, beautiful solution. The girders are a hint.

Hint 2:.

This is not a sequence or cipher. @jlee found one thing. Where are the rest?

• Are rot13(gur pbybef bs gur obeqref) significant? Aug 17 at 3:45
• @EdMurphy Yes, I updated the text to that effect.
– Amoz
Aug 24 at 17:50
• Maybe I'm odd, but this is in my top 3 favorite puzzles I've made so far, even though it's a simple concept. I hope everyone at least gives it a try. Look for an obviously correct answer that explains all aspects of the puzzle.
– Amoz
Aug 31 at 18:20
• Something just clicked. But i need to figure out one more thing!
– JLee
Sep 3 at 11:34
• Does the gray vs black girder color have any significance? Or is that just an image artifact?
– JLee
Sep 11 at 14:13

The missing levels require ...

... 41 003 010 and 40 000 000 bricks.

With these numbers, the total sum of all bricks in the tower is 281 828 172, which are the first nine decimal digits of Euler's number e = 2.718281828459..., read from right to left.
The sum of the digits on each level are the digits of π = 3.141592653..., read from bottom to top. (I hadn't realised this until JLee pointed it out.)
{Op edit: This is equivalent to right-aligning the numbers and then summing the columns from right to left to construct a number, and summing the rows from bottom to top to construct a number. This insight is important for the later bonus challenge). Also note that finding one # without the other does not lead to a unique solution.}

Here's the complete tower with the zeros left out for clarity:

               · · · · · · · 3 ·    3
2 · · · · 3 · · ·    5
· · · 4 2 · · · ·    6
· · · · · 1 1 · ·    2
· 4 1 · · 3 · 1 ·    9
· · · 3 · · · · 2    5
· · · · · 1 · · ·    1
· 4 · · · · · · ·    4
· · · 1 · · · · ·    1
· · · · · · · 3 ·    3

2 8 1 8 2 8 1 7 2


That was hinted at ...

... by the fact that a mathematician had commissioned the tower. Leonhard Euler was a famous mathematician. And Euler's formula, which uses both e and π is considered to be very beautiful by some, also in our circles.

The grey girders, when flipped horizontally, look like an e, so the digits of e must be read right to left.. When flipped vertically, they look like a π, so π must be read from bottom to top.

Bonus challenge: A golden tower ...

... is related to the first nine digits of the golden ratio φ = 1.61803398874..., so we must arrange the existing digits horizontally to get 161 803 398, whose digit sum is also 39. But I don't see how.

Op Edit: (self-completing as the difficulty level of the bonus challenge was beyond the scope of the main puzzle.)

We have seen that if we align the digits to the right:
The sums of the columns from right to left form the beautiful number e.
The sums of the rows from bottom to top form the beautiful number pi.

So how can we form a third beautiful number without changing any integer values or the floor they are on?

Well, we were asked to make a golden tower, not a nedlog one, so let's align the digits to the left and sum left to right!
But we face a problem! The left digits sum to 26, and we are looking for the first 9 digits of phi, so it should begin with 1 or 16.
The secret here is to notice that we can left-pad zeros to the numbers; this will change their left alignment but not their integer values!
(Or you could just stagger them with whitespace, for the same result)...

 000000030        | 3
0200003000       | 5
0000000420000    | 6
00000001100      | 2
041003010        | 9
000300002        | 5
0001000          | 1
00040000000      | 4
100000           | 1
0000000030       | 3
_____________
1618033980000


Note that due to similar rows with a sole 1 or 3, a few trivial variants are possible by swapping similar rows, but they are essentially equivalent constructions)

The rows still add up to pi, the right-aligned digits still add up to e, and now the left-aligned rows add up to
1618033980000, which if we insert the required decimal, is 1.618033980000, which is mathematically equal to 1.61803398, the first nine digits of the golden ratio, as desired.
Thus our golden tower, concealing all three beautiful numbers, is complete!

• @MOehm In the hope that you don't mind, I tweaked the puzzle to eliminate the potential ambiguity. It should not affect your corrected answer; just needed to factor in the girder orientation.
– Amoz
Sep 12 at 13:19
• Also I just realized what you did by adding a 'depth dimension'. That's very clever... and cheating : ) (and far too easy). The bonus should be solved in 2D like the others.
– Amoz
Sep 12 at 14:59
• Can you rot13(ercynpr tbyq jvgu cynfgvp? Hasbeghangryl, fvyire qbrfa'g jbex, nf gur qvtvg fhz whzcf sebz 33 gb 40.) Sep 12 at 15:11
• @Amoz: Ah, I see what you mean and now I understand why the e is flipped. Yes, my idea was to reposition the digits for the gold tower in the third dimension. Aren't we constantly told that we should broaden our view when we can't solve a problem? :) And of course I don't mind that you made a slight modification to your puzzle. Sep 12 at 15:30
• rot13(Cuv vf gur pbeerpg inyhr, ohg sbe gur obahf V jnf ybbxvat sbe na ryrtnag fbyhgvba va gur fnzr fcvevg nf gur pheerag qrfvta (ahzoref ner rvgure ubevmbagny be iregvpny-ab 3Q be qvntbanyf, rgp.). Fvapr gur sybbef ner abg crezvggrq gb punatr, vg fubhyq or pyrne gung gur gnfx vf gb yrnir cv nybar, naq "ghea r vagb tbyq".) @EdMurphy
– Amoz
Sep 12 at 15:31