<s>[INST] Find all $n$ natural numbers such that $10\mid n^{10}+1$ Determine all natural numbers $n$ such that : 
$10$ divisor of $n^{10}+1$ 
My attempt : 
Let $n=r(\mod{10})$ so $n^{10}+1=(r^{10}+1)(\mod{10})$ 
This mean : $r^{10}+1=0(\mod{10})$ 
Now $r\in {0,1,2,3,4,5,6,7,8,9}$ after try I get $r=3,7$ 
So : $n=10k+3,10k+7$ 
Is my work correct ? 
Please I need other simple method to computing 
 [/INST] By Fermat's theorem, $n^5 \equiv n \bmod 5$. Therefore, $n^{10} \equiv n^2 \bmod 5$ and so $n^{10} +1 \equiv n^2 +1 \bmod 5$. Thus, if $10\mid n^{10}+1$, then $n^2 \equiv 4 \bmod 5$ and so $n \equiv \pm 2 \equiv 2,3 \bmod 5$. Thus, $n \equiv 2,3,7,8 \bmod 10$. Since $n$ is odd, we're left with $n \equiv 3,7 \bmod 10$.
Alternatively,
By Euler's theorem, $n^4 \equiv 1 \bmod 10$, and so $n^{10} \equiv n^2 
\bmod 10$. Thus, if $10\mid n^{10}+1$, then $n^2 \equiv 9 \bmod 10$. Therefore, $n \equiv 3,7 \bmod 10$.
</s>