Does Diophantine equation $1+n+n^2+\dots+n^k=2m^2$ have a solution for $n,k \geq 2$?

Suppose we have $(n,s,x,y)$ with $n,s>1$ odd $$n^s+1=2x^2\quad\text{and}\quad \frac{n^s-1}{n-1}=y^2,$$ then by a result of Ljunggren, we must have $n=3,s=5$, which gives $x^2=122$. Hence, there are no integral solutions to the system of equations in Theorem $1$ (see below). We conclude that there are no solutions in the positive integers to $$ \frac{n^{k+1}-1}{n-1}=2m^2 $$ with $n,k\ge 2$.


Theorem 1: Assume there exists a triple $(n,k,m)$ of positive integers with $n,k\ge 2$ $$\frac{n^{k+1}-1}{n-1}=2m^2.$$ Write $k+1=2^rs$ with $s$ odd. Then $r=1$, and there exist positive integers $x,y$ with $$ n^s+1=2x^2\quad\text{and}\quad \frac{n^s-1}{n-1}=y^2. $$

Proof: Suppose we have a solution $(n,k,m)$. Write $k+1=2^rs$, then $$ \frac{n^{2^rs}-1}{n^{s}-1}\cdot \frac{n^s-1}{n-1}=2m^2. $$ We show that no odd prime divides both factors on the left. Let $p$ be an odd prime, $t=\operatorname{ord}_p\left[n^s-1\right]$, let $g\in\mathbb{Z}$ be a primitive root modulo $p^{t+1}$, and let $\ell\ge 1$ be an integer with $n^s\equiv g^{\ell}\pmod {p^{t+1}}$. Then $\operatorname{ord}_p(\ell)=t-1$. Hence, $\operatorname{ord}_{p}(2^r\ell)=t-1$ and $\operatorname{ord}_p(n^{2^rs}-1)=t$, whence $p$ does not divide $(n^{2^rs}-1)/(n^s-1)$.

By a similar argument, $(n^s-1)/(n-1)$ is odd, which means it must be a perfect square. It follows that there exist positive integers $u,v$ such that $(u,2^r-1,v)$ is a solution (and we can take $u=n^s$). We find that, $$\prod_{t=0}^{r-1}\left(u^{2^t}+1\right)=\frac{u^{2^r}-1}{u-1}=2v^2.$$ It is very easy to prove that for all integers $t_1\neq t_2$, the greatest common divisor of $u^{2^{t_1}}+1$ and $u^{2^{t_2}}+1$ is a power of $2$. Therefore, each factor in the product on the left is either a perfect square or twice a perfect square.

Assume that $r\ge 2$, then $(u+1)(u^2+1)=u^3+u^2+u+1$ is either a perfect square or twice a perfect square. By Tomita's elliptic curve argument, it cannot be twice a perfect square, so it has to be a perfect square. By the result of Ljunggren, we must have $u=n^s=7$. Because $7^4+1$ is neither a square nor twice a square, we must have $r=2$, so $n=7$ and $k+1=2^rs=4$. However, $$\frac{7^4-1}{7-1}=400$$ is not twice a perfect square. Therefore, $r=1$. $\square$


$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)]