remainder when $a_{1000}$ is divided by $1000$ 
If  $a_{1}=7,a_{2}=7^7,a_{3}=7^{7^{7}}.$ Then the remainder when
$a_{1000}$ is divided by $1000$

what i try
$a_{1}=7=1\mod(1000)$ and
$a_{2}=7^7=1^7\mod(1000)=1\mod(1000)$
from using modulo theorem
$a_{3}=7^{7^{7}}=1^7\mod(1000)=1\mod(7)$
can we say that $a_{1000}= 1\mod(1000)$
Help me to solve it please

$$7^4=(50-1)^2=2401$$
$$7^{4n}=(1+2400)^n\equiv1+2400n\pmod{1000}$$
So, $n$ must be divisible by $5$  to make residue $\equiv1$
$\implies$ord$_{1000}7=20$
We need $a_{999}\pmod{20}$
Again, $a_r,r\ge2$ are of the form $7^{4n+3}$
$7^{4n+3}=7^3(50-1)^{2n}\equiv3(1-50)^{2n}\equiv3(1-\binom{2n}150)\pmod{20}\equiv3$
So for $r\ge2,$
$$a_{r+1}\equiv7^{3\pmod{20}}\pmod{1000}\equiv7^3$$
