Invariant in a sequence

135 Views Asked by At

Consider a sequence given by $a_0 = 1, a_1 = 0, a_2 = 1, a_3=0, a_4=1, a_5=0, a_n = a_{n-1}+a_{n-2}+a_{n-3}+a_{n-4}+a_{n-5}+a_{n-6}$
How to prove that $I\left(a_i,a_{i+1},a_{i+2},a_{i+3},a_{i+4},a_{i+5}\right) = \left(2a_i+4a_{i+1}+6a_{i+2}+8a_{i+3}+10a_{i+4}+12a_{i+5} \right)mod 10$ is the invariant ? Here the $a_{i},a_{i+1},a_{i+2},a_{i+3},a_{i+4},a_{i+5} $ is a contiguous subsequence of the sequence of $a_{i}$ defined as above.

1

There are 1 best solutions below

2
On BEST ANSWER

Hint : Let $x_{i}=2a_{i}+4a_{i+1}+6a_{i+2}+8a_{i+3}+10a_{i+4}+12a_{i+5}$. Then the only thing we have to do is showing $10|x_{i+1}-x_{i}$ for all $i$. In fact, $x_{i+1}-x_{i}=10a_{i+6}$.