<s>[INST] Prove for any integer $a$ show that $a$ and $a^{4n+1}$ have the same last digit 
For any integer $a$, show that $a$ and $a^{4n+1}$ have the same last digit

I know that if $a^{4n+1} \equiv a\pmod{10}$ then $10|a^{4n+1}-a$, so $2|a^{4n+1}-a$ and $5|a^{4n+1}-a$, but I'm not sure where to go from here.
 [/INST] If $\gcd(a,10) = 1$ then $a^{\phi(10)} = a^4 \equiv 1\mod 10$.  So $a^{4n+1} = (a^4)^n*a\equiv 1^na \equiv a \mod 10$.
If $\gcd(a,10) \ne 1$ then $a = 0, 5$ or $2^kb; \gcd(b,10) =1$.
$0^k = 0\equiv 0 \mod 10$ (duh) and $5^k \equiv 5 \mod 10$ (do I really need to show that?)
$6^2 = 36\equiv 6 \mod 10$ so by induction $6^k \equiv 6 \mod 10$.
So if $a = 2^k*b$ then $$a^{4n+1} = a *(a^{4n})=a*((2^4)^{kn}b^4)\equiv 16^{kn}a\equiv 6^{kn}a$$$$ \equiv 6a\equiv a(5+1) \equiv 5a + a \equiv 10*\frac a2 + a \equiv a\mod 10$$.
</s>