Recurrence relation and combinatorics

133 Views Asked by At

I am reading p.4 of the article http://mercercountymathcircle.files.wordpress.com/2014/03/recurrence_relations.pdf which consider the following problem: Find the units digit of $(3+\sqrt{7})^{2014}+(3-\sqrt{7})^{2014}$. The author uses the technique of linear recurrence and avoid binomial theorem (this problem is designed to resist binomial theorem). But I have a question about the method, namely

"because we know that once the units digits of two consecutive terms repeatthen everything that follows would also repeat"

in the article. I have done some experiment and found that $a_4\pmod{10}=a_5 \pmod{10}=6$ but $a_6 \pmod{10}=4$. So is there something that I misunderstand? Thanks for helps.

1

There are 1 best solutions below

0
On

I think you misinterpret repeating pattern. We know that $a_n$ only depends on $a_{n-1}$ and $a_{n-2}$. Now, we start with some given $a_1$ and $a_2$ (modulo $10$, since only the last digit is of interest). There are only $10\cdot 10=100$ possible combinations for a pair $(a_{n},a_{n+1})$. Since the sequence $(a_n)_{n\in \mathbb N}$ is infinite, we know by the pigeonhole principle that somewhere in the first $101$ pairs $(a_1,a_2)$, $\cdots$, $(a_{101},a_{102})$ there must be a duplicate pair. Since the recursion works both ways ($a_{n-1}$ is fixed when we know $a_n$ and $a_{n+1}$) we know that somewhere in the first $101$ pairs, there must be a duplicate of the pair $(a_1,a_2)$. Then, we know that the sequence $a_n$ is periodic with some period $p\leq 100$. Thus, when we need $a_{1234}$, it is enough to calculate $a_{i}$ with $i=1234\mod p$.