MHB What is the remainder when a_{2013} is divided by 7?

  • Thread starter Thread starter anemone
  • Start date Start date
  • Tags Tags
    Remainder
AI Thread Summary
The sequence defined by a_n = a_{n-1} + 3a_{n-2} + a_{n-3} with initial conditions a_0 = a_1 = a_2 = 1 exhibits periodic behavior when considered modulo 7, with a period of 6. The calculated values for a_n modulo 7 are 1, 1, 1, 5, 2, and 4 for n = 0 to 5. Since 2013 mod 6 equals 3, it follows that a_{2013} is equivalent to a_3. Therefore, the remainder when a_{2013} is divided by 7 is 5. This conclusion is supported by multiple calculations and confirmations within the discussion.
anemone
Gold Member
MHB
POTW Director
Messages
3,851
Reaction score
115
Consider a sequence given by $$a_n=a_{n-1}+3a_{n-2}+a_{n-3}$$, where $$a_0=a_1=a_2=1$$.

What is the remainder of $$a_{2013}$$ divided by $$7$$?
 
Mathematics news on Phys.org
anemone said:
Consider a sequence given by $$a_n=a_{n-1}+3a_{n-2}+a_{n-3}$$, where $$a_0=a_1=a_2=1$$.

What is the remainder of $$a_{2013}$$ divided by $$7$$?

Operating modulo 7 we have...

$$a_{0}=1$$
$$a_{1}=1$$
$$a_{2}= 1$$
$$a_{3} = 1 + 3 + 1 = 5$$
$$a_{4} = 5 + 3 + 1 = 2\ \text{mod}\ 7$$
$$a_{5} = 2 + 1 + 1 = 4\ \text{mod}\ 7$$
$$a_{6} = 4 + 6 + 5 = 1\ \text{mod}\ 7$$
$$a_{7} = 1 + 12 + 2 = 1\ \text{mod}\ 7$$
$$a_{8} = 1 + 3 + 4 = 1\ \text{mod}\ 7$$
$$a_{9} = 1 + 2 + 1 =5\ \text{mod}\ 7$$

... and we can stop because the sequence is mod 7 periodic with period 6. Now is $2013\ \text{mod}\ 6 = 3$, so that the requested number is $a_{3}=5$...

Kind regards

$\chi$ $\sigma$
 
Last edited:
I agree with chisigma on the level of algebra, but not on the level of arithmetic. In fact, reducing all the coefficients mod 7 as we go along,

$a_{n+3} = a_{n+2} + 3a_{n+1} + a_{n}$,

$a_{n+4} = a_{n+3} + 3a_{n+2} + a_{n+1} = (a_{n+2} + 3a_{n+1} + a_{n}) + 3a_{n+2} + a_{n+1} = 4a_{n+2} + 4a_{n+1} + a_{n}$,

$a_{n+5} = a_{n+4} + 3a_{n+3} + a_{n+2} = (4a_{n+2} + 4a_{n+1} + a_{n}) + 3(a_{n+2} + 3a_{n+1} + a_{n}) + a_{n+2} = a_{n+2} + 6a_{n+1} + 4a_{n}$,

$a_{n+6} = a_{n+5} + 3a_{n+4} + a_{n+3} = (a_{n+2} + 6a_{n+1} + 4a_{n}) + 3(4a_{n+2} + 4a_{n+1} + a_{n}) + (a_{n+2} + 3a_{n+1} + a_{n}) = a_{n}$

(for all $n\geqslant0$). So the sequence repeats with period $6$. It starts with $(a_0,a_1,a_2,a_3,a_4,a_5) = (1,1,1,5,2,4)\pmod7$, and since $2013=3\pmod6$ it follows that $a_{2013} = a_3 = 5\pmod7.$
 
Thanks to both chisigma and Opalg for the submission to this problem and I've been really impressed with the creativity that gone into the two approaches above and please allow me to thank you all again for the time that the two of you have invested to participate in this problem. :)
 
Seemingly by some mathematical coincidence, a hexagon of sides 2,2,7,7, 11, and 11 can be inscribed in a circle of radius 7. The other day I saw a math problem on line, which they said came from a Polish Olympiad, where you compute the length x of the 3rd side which is the same as the radius, so that the sides of length 2,x, and 11 are inscribed on the arc of a semi-circle. The law of cosines applied twice gives the answer for x of exactly 7, but the arithmetic is so complex that the...
Is it possible to arrange six pencils such that each one touches the other five? If so, how? This is an adaption of a Martin Gardner puzzle only I changed it from cigarettes to pencils and left out the clues because PF folks don’t need clues. From the book “My Best Mathematical and Logic Puzzles”. Dover, 1994.

Similar threads

Replies
15
Views
2K
Replies
4
Views
3K
Replies
1
Views
1K
Replies
3
Views
2K
Replies
3
Views
1K
Replies
2
Views
1K
Replies
2
Views
2K
Back
Top