<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] 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!]
</s>