A sequence S n is defined such that S 0 = 0 , S 1 = 1 and S n = S n − 1 − S n − 2 .
What is the value of S 2 0 1 7 ?
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.
Calculating some terms we see that S=[0,1,1,0,-1,-1,0,1,...] This repeats with period 6 so the answer is the same as the 2017 mod 6 th term. 2017=1 mod 6 so the answer is one.
Since S 0 = 0 , S 2 0 1 7 is actually the 2 0 1 8 t h term, so we must find 2 0 1 8 ( m o d 6 ) , which is 2 . This corresponds to the second term in the periodic sequence, which is 1 .
I think your reasoning that " 2 0 1 7 ≡ 1 ( m o d 6 ) so the answer is one" is flawed, because by that logic, if 2 0 1 8 ≡ 2 ( m o d 6 ) , then the answer is 2 . Be careful: remember that n ≡ m ( m o d 6 ) corresponds to the m t h term in the periodic sequence 0 , 1 , 1 , 0 , − 1 , − 1 .
Log in to reply
Sorry. That was what IO was trying to get at, I guess I just didn't make it obvious
I did it with 2017 mod 6, just had to remember the numbering of the terms starts with 0th term. No problem. Do it in computer science all the time.
Let us solve this linear recursion by the following method. It has the characteristic equation r 2 − r + 1 = 0 , or r = 2 1 ± 3 i . This leads to the general form:
S n = A ( 2 1 + 3 i ) n + B ( 2 1 − 3 i ) n = A e i 3 n π + B e − i 3 n π
Implementing the initial conditions S 0 = 0 , S 1 = 1 now solves the real constants A and B :
0 = A + B
1 = A ( 2 1 + 3 i ) + B ( 2 1 − 3 i )
which yields A = 3 i 1 and B = − 3 i 1 . We ultimately end up with:
S n = 3 i 1 ⋅ [ e i 3 n π − e − i 3 n π ] = 2 3 i 2 ⋅ [ e i 3 n π − e − i 3 n π ] = 3 2 ⋅ [ 2 i e i 3 n π − e − i 3 n π ] = 3 2 s i n ( 3 n π )
Computing S 2 0 1 7 gives 3 2 s i n ( 3 2 0 1 7 π ) = 3 2 ⋅ 2 3 = 1 .
S2017 = S2016-S2015
(S2015-S2014)-S2015
-S2014
-(S2013-S2012)
-(S2012-S2011-S2012)
S2011
Therefore,S2017=S2017-6x,Where x is a
integer and 6x<2017
Let x be 336, Therefore S2017=S2017-2016
S2017=S1=1
Problem Loading...
Note Loading...
Set Loading...
For the linear recurrence relation S n = S n − 1 − S n − 2 , the characteristic equation is:
r 2 ⟹ r 2 − r + 1 ⟹ r = r − 1 = 0 = 2 1 ± 3 i = e ± 3 π i
⟹ S n S 0 ⟹ c 2 S 1 c 1 3 i ⟹ c 1 ⟹ S n ⟹ S 2 0 1 7 = c 1 e 3 π n i + c 2 e − 3 π n i = c 1 + c 2 = 0 = − c 1 = c 1 ( e 3 π i − e − 3 π i ) = 1 = 1 = − 3 i = 3 i ( e − 3 π n i − e 3 π n i ) = 3 2 sin 3 n π = 3 2 sin 3 2 0 1 7 π = 3 2 sin 3 π = 1