<s>[INST] Find all positive integer solutions of the equation $n^5+n^4 = 7^m-1$ 
Find all positive integer solutions of the equation $n^5+n^4 = 7^m-1$.

Suppose $n$ is odd. Then we have $$n^5+n^4 \equiv \pm 2 \not \equiv 7^m-1 \pmod{7}.$$ Thus $n$ is even. Let $n = 2k$ for some positive integer $k$, and we have $$n^4(n+1) = 16k^4(2k+1) = 7^m-1,$$ so since $7^m \equiv 7 \pmod{16}$ for odd $m$ and $7^m \equiv 1 \pmod{16}$ for even $m$, it follows that $m$ is even. Let $m = 2j$ for some positive integer $j$. Then the equation is $$16k^4(2k+1) = 7^{2j}-1.$$ Thus, $7^{2j} = 16k^4(2k+1)+1$.
I didn't see how to continue.
 [/INST] Let's start by observing that
$$
n^5+n^4 + 1 = (n^2 + n + 1)(n^3-n+1).
$$
Now, let $d=gcd(n^2 + n + 1,n^3-n+1)$. Note that, $d\mid n^2 + n + 1 \implies d\mid n^3 - 1$. Hence, $n^3 \equiv 1\pmod{d}.$ But since $d|n^3-n+1$, we must have, $n\equiv 2\pmod{d}$. Hence, $d|7$, therefore $d$ is either $1$ or $7$.
Note that $n=2$ and $m=2$ is a solution. Suppose $n \geq 3$. $n^3-n+1>n^2+n+1$. From the condition on $d$, we must either have $n^2+n+1 = 1$ or $7$. But clearly, the only $n$ that fulfills this is $n=2$.
Hence, $(2,2)$ is the only solution.
</s>