<s>[INST] Does Diophantine equation $1+n+n^2+\dots+n^k=2m^2$ have a solution for $n,k \geq 2$? When studying properties of perfect numbers (specifically this post), I ran into the Diophantine equation
$$
1+n+n^2+\dots+n^k=2m^2, n\geq 2, k \geq 2.
$$
Searching in range $n \leq 10^6$, $k \leq 10^2$ yields no solution. So I wonder if there are any solutions, and if not, is there some elementary reason for that? Or if it can be converted to some known open problem, that would do too...
Some thoughts: Of course if we allow $n=1$ or $k=1$ we could get trivial solutions. We can also see by mod $2$ that both $n$ and $k$ must be odd. Now we could try to solve some small cases such as $k=3$ or $k=5$... So set $k=3$ and try to solve $$1+n+n^2+n^3=2m^2.$$ Left side factors and hence we want to solve $(n+1)(n^2+1)=2m^2$. Now this imples $4 \mid 2m^2$ and so $m$ is even. Also we can see that $4 \nmid n^2+1$ for any integer $n$ (becase $n^2\equiv 0,1 \pmod 4 $). So all powers of $2$ in $2m^2$ except one will divide $n+1$. So let $m=2^t r$ with $2 \nmid r$,  then $2m^2=2^{2t+1}r^2$, $2^{2t} \mid n+1$, $2 \mid n^2+1$. So we can put $n=2^{2t}s-1$ with $2 \nmid s$, substitute it back, divide all powers of $2$ and we have the equation
$$
s(2^{4t-1}s^2-2^{2t}s+1)=r^2.
$$
Now the two expressions in the product are coprime, so they both have to be square, and that is farthest I got so far. Also the expression $2^{4t-1}s^2-2^{2t}s+1$ being square has a solution $s=15,t=2$, and I am yet to find another (but of course $s$ is not a square in this case so it does nothing for the original problem).
 [/INST] $1+n+n^2+n^3=2m^2$ can be transformed to $y^2 = x^3+2x^2+4x+8$ with $x=2n$ and $y=4m.$
The equation $y^2 = x^3+2x^2+4x+8$ is an elliptic curve which has one torsion point $(x,y)=(-2,0)$ and the rank of curve is $0$.
Since rank is $0$, so there are no rational points of infinite order on the curve.
The only integral point is torsion point $(x,y)=(-2,0)$ .
Thus, there are no positive integral solution.
           sage: E = EllipticCurve([0,2,0,4,8])
           sage: E.rank()
           0
           sage: E.torsion_points()
           [(-2 : 0 : 1), (0 : 1 : 0)]

</s>