(solved by François Caddet, Marc Coiffier, and Jean-Alix David). Let $\left(a_{n}\right)$ be defined by $a_{1}=3$, $a_{2}=2$, and for $n \geqslant 1, a_{n+2}$ is the remainder of the Euclidean division of $a_{n}+a_{n+1}$ by 100. Calculate the remainder of the Euclidean division of:

$$
a_{1}^{2}+a_{2}^{2}+\cdots+a_{2007}^{2}
$$

by 8.
. Consider the sequence $\left(b_{n}\right)$ such that $0 \leqslant b_{n} \leqslant 3$ and $b_{n} \equiv a_{n}(\bmod 4)$. Since 4 divides 100, $\left(b_{n}\right)$ satisfies the recurrence relation $b_{n+2} \equiv b_{n}+b_{n+1}(\bmod 4)$. We notice that the sequence $\left(b_{n}\right)$ is periodic, with the sequence $3,2,1,3,0,3$ repeating 334 times up to 2004. Furthermore, if $a \equiv b$ $(\bmod 4)$, then $a^{2} \equiv b^{2}(\bmod 8)$. Indeed, writing $a=b+4 k$, we have $a^{2}=(b+4 k)^{2}=b^{2}+8 k b+16 k^{2}$. We deduce that $a_{1}^{2}+a_{2}^{2}+\cdots+a_{2007}^{2} \equiv 334(1+4+1+1+0+1)+1+4+1 \equiv 6(\bmod 8)$. The answer to the question is therefore 6.