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

630 Views Asked by At

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).

3

There are 3 best solutions below

11
On BEST ANSWER

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$

3
On

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

Here is an elementary proof that $1+n+n^2+n^3=2m^2$ has only integer solution $(n,m)=(-1,0)$. This is the minimal case referred in the general proof and this post gives an alternative without using the elliptic curves.

Since $(n+1)(n^2+1)=2m^2$ and gcd of the expressions on the left is $2$ (by parity argument $n$ must be odd, and $4 \nmid n^2+1$), we thus have $n^2+1$ either square of twice a square. It cannot be a square unless $n=0$ (which does not solve the original equation), hence $n^2+1=2a^2$, and so $n+1=b^2$. As $n$ is odd $b$ is even, say $b=2c$. Thus $n=4c^2-1$ and plugging to the previous equation we get $(4c^2-1)^2+1=2a^2$. However with some manipulation this can be written as: $$ (2c^2-1)^2+(2c^2)^2=a^2. $$ This is a primitive Pythagorean triple ($2c^2$ and $2c^2-1$ are coprime). It implies $2c^2=2\alpha \beta$, $2c^2-1=\alpha^2-\beta^2$ for some coprime integers $\alpha, \beta$. But then $c^2=\alpha \beta$ and $\alpha=\gamma^2$, $\beta=\delta^2$ for some integers $\gamma$, $\delta$. Plugging to the other equation we get $2\gamma^2 \delta^2-1=\gamma^4-\delta^4$. We rewrite this as $(\delta^2+\gamma^2)^2=2\gamma^4+1$, now we are ready to use the following lemma:

Lemma. Only integer solutions to $x^2=2y^4+1$ are $(x,y)=(\pm 1,0)$.

Proof. There is an elementary proof on this site already, see Integer solutions to $x^2=2y^4+1$.. It was also the Problem 4 on China IMO Team Selection Test in 1993, see this AoPS thread. Here is a proof based on ideas in linked posts/comments:

Clearly $y=0$ is a solution with $x=\pm 1$, so assume $y \neq 0$. Since $x$ is odd, put $x=2k+1$. The equation becomes $2k(k+1)=y^4$. Hence $y=2z$ and $k(k+1)=8z^4$. Since $\gcd(k,k+1)=1$, one of $k,k+1$ is fourth power and the other is $8$ times a fourth power.

If $k+1 = 8a^4, k = b^4$, then $b^4=8a^4-1 \equiv -1 \pmod 8$, impossible.

If $k+1 = b^4, k = 8a^4$, we can write $8a^4=(b^4-1)=(b^2-1)(b^2+1)$. Since $4 \nmid b^2+1$, it's clear that $\gcd(b^2-1,b^2+1) = 2$ and we have $a^4=\frac{b^2-1}{4} \frac{b^2+1}{2}$. Then $b^2-1=4t^2=(2t)^2$ and so $b=\pm 1$. But then $a=0$, impossible since $y \neq 0$.

So by the Lemma with $x=\delta^2+\gamma^2$ and $y=\gamma$, we have $\gamma=0$ and $\delta^2=1$. By a backwards substitution $\alpha=0, \beta=1$, then $c^2=0$ and finally $n=-1$ is the only solution (with $m=0$).