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

  • Thread starter Thread starter anemone
  • Start date Start date
  • Tags Tags
    Remainder
Click For 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. :)
 
Here is a little puzzle from the book 100 Geometric Games by Pierre Berloquin. The side of a small square is one meter long and the side of a larger square one and a half meters long. One vertex of the large square is at the center of the small square. The side of the large square cuts two sides of the small square into one- third parts and two-thirds parts. What is the area where the squares overlap?

Similar threads

  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 20 ·
Replies
20
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
Replies
2
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K