A Modular Recursion Sequence?

Let recursion a i a_i be defined as:

a n = a n 1 + a n 2 ( m o d 10 ) a_n=a_{n-1}+a_{n-2} \pmod{10}

where all terms in the sequence are positive integers less than ten. For any given a 1 a_1 and a 2 a_2 , a distinct sequence is formed. For example, if a 1 = 5 a_1=5 and a 2 = 4 a_2=4 , the sequence would go 5, 4, 9, 3, 2, 5, 7, 2, 9, 1, so on and so forth. If a 6 = 6 a_6=6 , find the sum of all possible values of a 1 a_1 .


The answer is 9.

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.

4 solutions

Jared Low
Apr 3, 2014

Let a 1 = x a_1=x and a 2 = y a_2=y . Applying the recursive formula provided, we then have a 6 = n a_6=n , where n 3 x + 5 y ( m o d 10 ) n \equiv 3x+5y \pmod{10} . We now have two cases:

Case 1: When y y is an odd number, we have n 3 x + 5 ( m o d 10 ) n \equiv 3x+5 \pmod{10} or equivalently 3 x 1 ( m o d 10 ) 3x \equiv 1 \pmod{10} , since we wish to have n 6 ( m o d 10 ) n \equiv 6 \pmod{10} . The only possible positive integer value for x = a 1 10 x=a_1 \leq 10 that fits the above equation is x = a 1 = 7 x=a_1=7

Case 2: When y y is an even number, we have n 3 x ( m o d 10 ) n \equiv 3x \pmod{10} or equivalently 3 x 6 ( m o d 10 ) 3x \equiv 6 \pmod{10} , since we wish to have n 6 ( m o d 10 ) n \equiv 6 \pmod{10} . The only possible positive integer value for x = a 1 10 x=a_1 \leq 10 that fits the above equation is x = a 1 = 2 x=a_1=2 .

Given that the two possible values for a 1 a_1 is 2 , 7 2,7 , their sum is thus 2 + 7 = 9 2+7=\fbox{9}

Beautiful! Perfect.

Finn Hulse - 7 years, 2 months ago
Finn Hulse
Apr 1, 2014

For the sixth term of the sequence to be six, let us look at the possible fifth and fourth terms which add to give six mod ten. Here is a list:

... 9, 7, 6

... 8, 8, 6

... 7, 9, 6

... 5, 1, 6

... 4, 2, 6

... 3, 3, 6

... 2, 4, 6

... 1, 5, 6

Continuing each sequence to find the first term, we find that the only two first terms are seven and two. Thus the answer is 7 + 2 = 9 7+2=\boxed{9} .

Cool.

Emily Davis - 7 years, 2 months ago

Yep, this is what I did.

Ahmad Naufal Hakim - 7 years, 2 months ago

i guess this is the easier method although a bit rigorous... :P

Krishna Arjun - 7 years, 1 month ago

Log in to reply

That's the way to go. :D

Finn Hulse - 7 years, 1 month ago

sequences for first two terms will be as 7,1,8,9,7,6 and 2,8,0,8,8,6 ...and all other terms cant give sequence by any how.. so sum of 7 and 2 is 9 !!!

Ajay Jain - 7 years, 1 month ago
Kim Fierens
Apr 24, 2014

Noting that all the solutions already given are more elegant than this, here are a few Mathematica commands that will solve it by brute force:

a[n_] := Mod[a[n - 1] + a[n - 2], 10];

a[1] = i; a[2] = j;

Position[Table[a[6], {i, 1, 9}, {j, 1, 9}], 6]

We get only pairs with first elements 2 and 7, so the answer is 9.

Jishnu Sen
Apr 20, 2014

After solving in few trial and error method, i found a linear Diophantine equation 3x+5y=4 ; where x is the first term and y is the second term and the solutions of the equation will give the required result.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...