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.
Hint: If $\gcd(n+1,n^2+1)=2$ then $n$ is odd, say $n=2k+1$, and so you get $$a^2=\frac{n^2+1}{2}=\frac{4k^2+4k+2}{2}=k^2+(k+1)^2=k^2+b^4,$$ which is a Pythagorean triple. Can you continue from here? [There is still quite some work to be done!]
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
This is an old math olympiad problem.
The elementary solution involves repeated use of the well-known parametrization of Pythagorean triples (Euclid's formula).
You arrive at $n^2 + 1 = 2a^2$ and $n + 1 = 2b^2$, so that $2b^4 - 2b^2 + 1 = a^2$. Rewrite this as $(b^2)^2 + (b^2 - 1)^2 = a^2$ and use Euclid's formula.
Finally it gets down to Fermat's equations $x^4 \pm y^4 = z^2$, which have no non-trival solutions, as can be shown (again) by using Euclid's formula and infinite descent.
Nevertheless, a more advance approach is simply to view this as an elliptic curve and use a computer algebra system to find the integral points.
Run the following Sage code on Sage Cell Server to get the answer in no time:
EllipticCurve([0, 1, 0, 1, 1]).integral_points()
Output:
[(-1 : 0 : 1), (0 : 1 : 1), (1 : 2 : 1), (7 : 20 : 1)]