you shall not pass the test

Gandalf has a sequence of numbers. The first number a 0 = 1 a_0 = 1 and the second number a 1 = 1 a_1 = 1 . You can calculate the rest of the sequence using the given formula a n + 2 = a n + 1 a n a_{n+2} = a_{n+1}-a_n . What is a 1248 a_{1248} ?

-1 1 2 -2 0

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.

1 solution

Note that the answer should be 0 . See the solution below. \color{#D61F06} \text{Note that the answer should be }\boxed{0} \text{. See the solution below.}

Given that a 0 = a 1 = 11 a_0 = a_1 = 11 and a n = a n 1 a n 2 a_n = a_{n-1} - a_{n-2} for n 2 n\ge 2 , therefore,

a 2 = a 1 a 0 = 1 1 = 0 a 3 = a 2 a 1 = 0 1 = 1 a 4 = a 3 a 2 = 1 0 = 1 a 5 = a 4 a 3 = 1 + 1 = 0 a 6 = a 5 a 4 = 0 + 1 = 1 a 7 = a 6 a 5 = 1 0 = 1 \begin{aligned} a_2 & = a_1-a_0 = 1-1 = 0 \\ a_3 & = a_2-a_1 = 0 - 1 = - 1 \\ a_4 & = a_3-a_2 = -1 - 0 = - 1 \\ a_5 & = a_4-a_3 = -1 + 1 = 0 \\ a_6 & = a_5-a_4 = 0 + 1 = 1 \\ a_7 & = a_6-a_5 = 1 - 0 = 1 \end{aligned}

We note that a 6 = a 7 = a 0 = a 1 = 1 a_6=a_7=a_0=a_1=1 , the sequence repeats with a period of 6. That is a n + 6 = a n a_{n+6} = a_n . Therefore.

a n = { 1 if n m o d 6 = 0 or 1 0 if n m o d 6 = 2 or 5 1 if n m o d 6 = 3 or 4 a_n = \begin{cases} 1 & \text{if }n \bmod 6 = 0 \text{ or } 1 \\ 0 & \text{if }n \bmod 6 = 2 \text{ or } 5 \\ -1 & \text{if }n \bmod 6 = 3 \text{ or } 4 \end{cases}

Since the first number is a 0 a_0 , the 1248th number is a 1247 = 0 a_{1247} = \boxed{0} , because 1247 m o d 6 = 5 1247 \bmod 6 = 5 .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...