<s>[INST] Find all $n\in \mathbb{Z}^+ : 7|5^{6n}+5^n+2$ Question: We want to find all $n\in \mathbb{Z}^+$ such that $7|5^{6n}+5^n+2$.
Answer: We have that $7|5^{6n}+5^n+2 \iff 5^{6n}+5^n+2 \equiv 0 \bmod 7$.
But $\phi(7)=6\wedge\text{gcd}(5,7)=1$ and we can apply Fermat's theorem, so $5^6 \equiv1 \bmod 7\implies 5^{6n}\equiv1 \bmod 7 $. So, we have to find all positive integers $n$ such that 
$$5^n+3\equiv0 \bmod 7 \iff 5^n \equiv 4 \bmod 7 \iff 2\cdot 5^n\equiv1 \bmod 7$$
I stuck in this point. Any help please? 
Thank you in advance.
 [/INST] From $5^n \equiv 4 (\bmod{7})$ write $(-2)^n \equiv 4 (\bmod{7})$ so that 
$(-2)^{n-2} \equiv 1 (\bmod{7}).$  The order of $-2 (\bmod{7})$ is $6$, so $6\mid n-2$.  Therefore $n =6k+2$ for any integer $k$.
</s>