<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] I. If $1+n+n^2+n^3=z^2$, and odd $n=2y+1$, then$$1+n+n^2+n^3=8y^3+16y^2+12y+4=z^2$$
Since $4$ divides $z^2$, then if $z^2=4w^2$ $$2y^3+4y^2+3y+1=w^2$$ and factoring $$(y+1)(2y^2+2y+1)=w^2$$
Now $y+1$ and $2y^2+2y+1$ are relatively prime, since if integer $k$ divides $y+1$, then $k$ divides $2y(y+1)=2y^2+2y$, and hence $k$ does not divide $2y^2+2y+1$.  If their product is square, then both $y+1$ and $2y^2+2y+1$ are squares.
II. Let $2y^2+2y+1$, which is odd, $=(2t+1)^2=4t^2+4t+1$.   Then$$y^2+y=2t^2+2t$$and$$\frac{y(y+1)}{2}=\frac{2t(t+1)}{2}$$Hence the LHS is a triangle number which is double a triangle number, and it lies in the sequence $$6,  210,  7140, 242556,   8239770,  279909630,  9508687656, ...$$and $y$ belongs in the sequence $$3, 20, 119, 696, 4059, 23660, 137903,...$$III. With a little more argument, drawing upon the sequence of solutions to the Pell equation$$b^2=2a^2 {^+_-} 1$$ it is possible to rule out all members of the $y$-sequence except $y=3$, and so prove that $n=7$.
I don't know if this approach is better than one by way of Pythagorean triples, but identifying $y$ as a factor in this relatively small sub-set of the triangle numbers seems a good way to go.
</s>