Odd and Even Pyramids

Logic Level 2

In the graph below, the number in any box is the sum of the two numbers below it. The bottom numbers can be anything. What is the maximum possible amount of odd numbers that can be used in the pyramid?

5 5 7 7 13 13 10 10

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

There are many solutions to this problem, but we only need to know one:

Lets start from the top and work our way down.

First, the top number can be odd or even, lets make it odd.

There is only one way for the second row, an odd and an even.

For the third row, on the even side, we can use two odds, and then use an even, because even plus odd equals odd.

For the fourth row, we can use three odds and an even like this:

And for the fifth and final row, we can use this configuration to get the max number of odds:

If we count up the total amount of odds, we get 10 \boxed{10} odds.

Nice problem and solution! Can it be generalised? How many odd numbers can we get in a pyramid with n n cells in the bottom row?

Chris Lewis - 3 months, 1 week ago

Log in to reply

I don't know, thanks for the idea. I'll try and see if I can find something out.

Nicholas Benedict - 3 months, 1 week ago

@Chris Lewis , A couldn't make a formula, but I created a Python Code. Here it is:


 #You can out whatever number you want for N, the number of cells in the bottom row.
 N = 3 

 T = 4

 CN = 0

 while N != 0:

     if N+2 >= T:

         if N >= T:

               CN = CN + T*(T+1)/2

               CN = CN - (T-1)

               CN = CN - {(T-3)*(T-2)/2}

               T = T+3

         elif N+1 = T:

               CN = CN + (T-1)*T/2

               CN = CN - {(T-1)*2/3}

               CN = CN - {(T-3)*(T-2)/2}

               T = T+3

         elif N+2 = T:

               CN = CN + (T-2)*(T-1)/2

               CN = CN - {(T-1)*1/3} 

               CN = CN - {(T-3)*(T-2)/2} 

               T = T+3


     elif T > N+2:

               print (CN+1)

Nicholas Benedict - 3 months, 1 week ago

Using the above pattern, it can be verified inductively that the maximum number of odd numbers for n n cells in the bottom row is 1 3 ( n 2 + n + 1 ) \lfloor \frac{1}{3}(n^2 + n + 1) \rfloor .

David Vreken - 3 months, 1 week ago

Log in to reply

Oh okay, I don't know stuff that is that complex yet.

Nicholas Benedict - 3 months, 1 week ago

Log in to reply

@Nicholas Benedict I'm sure you will eventually, especially if you're thinking about great problems like this one!

David Vreken - 3 months, 1 week ago

Log in to reply

@David Vreken Thank you!

Nicholas Benedict - 3 months, 1 week ago

Thank you for the formula though, @David Vreken

Nicholas Benedict - 3 months, 1 week ago

Log in to reply

@Nicholas Benedict I searched it up online an figured out that it was a rounding symbol

Nicholas Benedict - 3 months ago

@David Vreken How did you figure out the formula

Aditya Mittal - 2 months, 1 week ago

Log in to reply

@Aditya Mittal I found the first few sums of odd numbers for the first few rows:

and I noticed the sums follow a pattern for every third row.

For rows n = 1 , 4 , 7 , . . . n = 1, 4, 7, ... , the sums are 1 , 7 , 19 , . . . 1, 7, 19, ... which follows the equation 1 3 ( n 2 + n + 1 ) \frac{1}{3}(n^2 + n + 1) .

For rows n = 2 , 5 , 8 , . . . n = 2, 5, 8, ... , the sums are 2 , 10 , 24 , . . . 2, 10, 24, ... which follows the equation 1 3 ( n 2 + n ) \frac{1}{3}(n^2 + n) .

For rows n = 3 , 6 , 9 , . . . n = 3, 6, 9, ... , the sums are 4 , 14 , 30 , . . . 4, 14, 30, ... which follows the equation 1 3 ( n 2 + n ) \frac{1}{3}(n^2 + n) .

So in summary we have a sum of 1 3 ( n 2 + n + 1 ) \lfloor \frac{1}{3}(n^2 + n + 1) \rfloor for all values of n n .

David Vreken - 2 months, 1 week ago

Log in to reply

@David Vreken Your answer is just awesome. :)) But I wanna point out one thing-----

The number of rows in the pyramid = no. of cells in the bottom row = n (always true)

Now n can be in any of these three forms: 3m, (3m+1), (3m+2), where m is an integer.

When n= 3m or 3m+2, Max odd no.s in the pyramid= [⅓(n^2 + n)]

When n= 3m+1, Max odd no.s in the pyramid= [⅓(n^2 + n+ 1)]

You actually wrote the correct answer just the last statement was a bit wrong. :)

GUDDU Banerjee - 2 weeks, 1 day ago

Log in to reply

@Guddu Banerjee Are you saying that this statement is incorrect: "So in summary we have a sum of 1 3 ( n 2 + n + 1 ) \lfloor \frac{1}{3}(n^2 + n + 1) \rfloor for all values of n n "? (Don't forget I added the floor function around it to adjust for the differences between 1 3 ( n 2 + n + 1 ) \frac{1}{3}(n^2 + n + 1) and 1 3 ( n 2 + n ) \frac{1}{3}(n^2 + n) )

David Vreken - 2 weeks, 1 day ago

Rounded[2n/3] ? Up or down, both. Oh, this is only for the bottom row, took the question wrong.

Saya Suka - 3 months ago

The real thing that is surprising about this problem. This is my third problem and many people tried it in just 1 DAY!

Nicholas Benedict - 3 months, 1 week ago

Log in to reply

Thank you everyone for doing this problem!

Nicholas Benedict - 3 months, 1 week ago

Log in to reply

Not a problem! I have posted the follow-up problem , following that your problem became popular.

Michael Huang - 3 months, 1 week ago

Log in to reply

@Michael Huang Thank you!

Nicholas Benedict - 3 months, 1 week ago
Wang Xingyu
Apr 4, 2021

Here is another layout.

My thinking is bottom-up, always keeping symmetry about the midline.

I used the exact same line of thought :)

F Zs - 3 days, 16 hours ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...