<s>[INST] If $1+n+n^2+n^3$ is a perfect square, then $n=1$ or $n=7$ I want to prove that if $1+n+n^2+n^3$ is a perfect square then $n=1$ or $n=7$.
I managed to prove that $1+n+n^2+n^3=(n^2+1)(n+1)$ and that $(n^2+1,n+1)$ is either $1$ or $2$.
I found out that it could not be $1$, and then $\frac{1}{2}(n^2+1,n+1)=1$.
From here I concluded that $n^2+1=2a^2$ and $n+1=2b^2$ for some $a,b\in\mathbb{N}$ and it is here where I need some help.
Please only provide hints.
 [/INST] Note that the LHS is a 4-term GP with $a = 1, r = n$. The sum is
$${1(1 - n^4) \over (1 - n)} = {n^4 - 1 \over n-1}$$
So, the equation becomes,
$${n^4 - 1 \over n-1} = y^2$$
This is the Nagell–Ljunggren Equation whose general form is:
$${x^n - 1 \over x - 1} = y^q$$
where, $x > 1, y > 1, n > 2, q ≥ 2$.
Known solutions are:
$${3^5 - 1 \over 3 - 1} = 11^2, {7^4 - 1 \over 7 - 1} = 20^2, {18^3 - 1 \over 18 - 1} = 7^3$$
So, for the 4th power version of your problem, $(7, 20)$ is the only known solution. I am not sure if there are other solutions possible. Need to study the original paper.
References:
See 2.2.4 The Nagell–Ljunggren Equation in
Perfect Powers:
Pillai’s works and their developments
by M. Waldschmidt
https://webusers.imj-prg.fr/~michel.waldschmidt/articles/pdf/PerfectPowers.pdf
</s>