4. Find all natural numbers $n$ for which the number $n^{7}+n^{6}+n^{5}+1$ has exactly three natural divisors. (O. Nechaeva, I. Rubanov)
Answer. 1. Solution. For $n=1, n^{7}+n^{6}+n^{5}+1=4$. The number 4 has exactly three divisors: 1, 2, 4. Notice further that $n^{7}+n^{6}+n^{5}+1=\left(n^{7}+n^{5}\right)+\left(n^{6}+1\right)=n^{5}\left(n^{2}+1\right)+\left(n^{2}+1\right)\left(n^{4}-n^{2}+1\right)=\left(n^{2}+1\right)\left(n^{5}+n^{4}-n^{2}+1\right)=\left(n^{2}+1\right)(n+1)\left(n^{4}-n+1\right) . \quad$ For $n>1$, the inequalities $n^{2}+1>n+1>1$ are satisfied, and the number $\left(n^{2}+1\right)(n+1)\left(n^{4}-n+1\right)$ has at least four distinct divisors: $1, n+1, n^{2}+1$ and $\left(n^{2}+1\right)(n+1)$.