<s>[INST] Prove that $n^7+7$ can never be a perfect square. Prove that for a positive integer $n$, $n^7+7$ cannot be a perfect square.
I managed to show that $n \equiv 5 \pmod{8}$ or $n \equiv 9 \pmod{16}$. But nothing came from that so I presume another approach is needed???
Thanks for any help.
 [/INST] Here is an alternative proof that is hopefully slightly simpler.
We will make use of a simple theorem whose proof is skipped here:
For any odd integer number $m$, we have $m^2\equiv 1(mod 4)$.
Assume on the contrary, $n^7+7$ is a perfect square, then there exists an integer $x$ such that $n^7+7=x^2$.
If $x$ is odd, $n$ would have to be even. And the left side would be $3 (mod 4)$ that contradicts the fact that the right side is $1 (mod 4)$ by the theorem above. So $x$ has to be even, and $n$ has to be odd. Further more, applying the above theorem on $n^6=(n^2)^3$, we know $n^7\equiv n (mod 4)$. Note the right hand size is $0 (mod 4)$ since $x$ is even, we must have $$n\equiv 1 (mod 4).$$
Let's denote $x=2b$ where $b$ is another positive integer. Now we get $n^7+7=4b^2$. Further utilizing the fact that $7=2^7-11^2$. We can rewrite the above equation as $n^7+2^7=4b^2+11^2$, or
$$(n+2)(n^6-2n^5+4n^4-8n^3+16n^2-32n+64)=4b^2+11^2.$$
Now, notice $n+2\equiv 3 (mod 4)$, it MUST have a prime factor $p$ with $p \equiv 3 (mod 4)$, and $p \mid (4b^2+11^2)$. We next consider two cases:
Case one: $11 \nmid b.$
Since $p \mid (4b^2+11^2)$, we know $p \neq 11$, $p \nmid b$,  $4b^2 \equiv -11^2(mod p)$. Note $\frac{p-1}{2}$ is odd, ${\left(4b^2\right)}^{\frac{p-1}{2}} \equiv {\left(-11^2\right)}^{\frac{p-1}{2}}(mod p)$, ${(2b)}^{p-1}=-11^{p-1}(mod p)$. Applying Fermat's little theorem, we get $1 \equiv -1 (mod p)$, a contradiction.
Case two: $11 \mid b.$
Let $b=11 \times a$, $a$ is an integer. We have
$$ (n+2)(n^6-2n^5+4n^4-8n^3+16n^2-32n+64)=(4a^2+ 1)\times 11^2. $$
We can manually verify that 
$$ 11 \nmid n^6-2n^5+4n^4-8n^3+16n^2-32n+64 $$ for $n \equiv -5 (mod 11)$ to $n \equiv 5 (mod 11).$ Hence $11^2 \mid n+2.$ Note $11^2 \equiv 1(mod 4)$, we still have the claim that $\frac{n+2}{11^2}$ has a prime factor $p$ with $p \equiv 3(mod 4)$, and $p \mid 4a^2+1$. 
$$ 4a^2 \equiv -1 (mod p)\\ {\left(4a^2\right)}^{\frac{p-1}{2}} \equiv -1 (mod p) \\ {\left(2a\right)}^{p-1} \equiv -1 (mode p) \\ 1 \equiv -1 (mod p),$$
a contradiction.
</s>