Take the 2-minute tour ×

Could you help me out with a piece of homework, I really do not know, how to solve this. Even how to begin.

$8$ natural numbers are written in a row. Each number, beginning from the third is a sum of last two numbers before it. Which maximum value has the first number if the last is $2018$?

Hope that my knowledge is solid enough for this task.

share|improve this question
Do you mean the sum of any two of the numbers before it (which makes the problem rather trivial), or the sum of the last two before it? –  Robert Israel Jan 24 '12 at 20:49
No, I mean two consecutive numbers –  user1131662 Jan 24 '12 at 21:00

2 Answers 2

up vote 5 down vote accepted

so far we know there are 8 numbers, so we can name them $$a_1,a_2,\ldots,a_8$$, and every number starting from 3rd the sum of two previous ones. so we know $$\begin{eqnarray} a_3 &=& a_2+a_1 &=& 1*&a_2&+1*&a_1& \\ a_4 &=& a_3+a_2 &=& 2*&a_2&+1*&a_1& \\ a_5 &=& a_4+a_3 &=& 3*&a_2&+2*&a_1& \\ a_6 &=& a_5+a_4 &=& 5*&a_2&+3*&a_1& \\ a_7 &=& a_6+a_5 &=& 8*&a_2&+5*&a_1& \\ a_8 &=& a_7+a_6 &=& 13*&a_2&+8*&a_1& \\ \end{eqnarray}$$

so we know whatever values we choose for $a_1$ and $a_2$, we will always get $a_8=13*a_2+8*a_1$ and from the problem we know $a_8= 2018$. the rest is easy, you just have to minimize value for $a_2$ (eg. $a_2 = 2$) and calculate the value for $a_1$ (which would be 249)

share|improve this answer
I think you've written $s_1$ where you meant to write $a_1$. –  Gerry Myerson Jan 24 '12 at 23:51
@GerryMyerson you were right, fixed. –  Ali.S Jan 25 '12 at 3:19
@Gajet Sorry, but I have problems understanding the last thing, I mean how do we get $2$ for $a_2$? Everything else's clear, thanks. –  user1131662 Jan 25 '12 at 9:14
I had to minimize the value for $a_2$, and I knew it's a positive integer. assuming $a_2=1$ will results in $a_1=\frac{2005}{8}$ which is not an integer. My next try was $a_2=2$! –  Ali.S Jan 25 '12 at 11:25
Thank you, now I get it. –  user1131662 Jan 25 '12 at 12:49

Assuming that you mean "... the sum of the last two numbers before it":

Every number is the sequence is a linear function of the two first ones. So write down the sequences starting from $1,0$ and $0,1$. Then you only need to puzzle out how to get $2018$ as a non-negative linear combination of the two final element.

Edit: The OP has clarified that he means "two consecutive numbers", but apparently not necessarily the previous two ones. In that case the answer is 2018, as evidenced by the sequence $$2018,0,2018,2018,2018,2018,2018,2018$$

share|improve this answer
... or a positive linear combination if your "natural numbers" don't include $0$. –  Robert Israel Jan 24 '12 at 20:52

Your Answer


