# $1+x+\ldots+x^n$ perfect square

Let $p$ be the polynomial $p(x)=1+x+\ldots+x^n$. For which couples $(a, n)\in\mathbb{N}^2$, $p(a)$ is a perfect square? I'm particularly interested in $p(3)$.

• $p(x)=\displaystyle\frac{x^{n+1}-1}{x-1}$ Apr 25 '13 at 10:39
• I know, but what can we do with that? Apr 25 '13 at 10:42
• If $a=3$,then $n=0,1,4$ are all the solutions. Apr 25 '13 at 11:00
• @Sophie Can you show us the proof? Apr 25 '13 at 11:03
• An idea: over the splitting field $K$ of $1 + x + ... + x^n$, the Galois group permutes the ideals $(a - \zeta^j)\mathcal{O}_K$, it also permutes prime factors of an ideal $p\mathcal{O}_K$ for a rational prime $p$. Apr 25 '13 at 11:52

The Diophantine equation $f_n(x)=1+x+x^2+\cdots+x^{n-1}=y^2$.

Ribenboim's book on Catalan's conjecture has a detailed analysis of this Diophantine equation. Except the cases noted below, there are no more non-trivial solutions. Here are some of the easy cases:

1. There are always the two trivial solutions $x=0$ and $x=-1$.

2. If $n$ is a square, then $x=1$ is a third solution.

3. For $n=3$, if $x\not=0$, then $-2|x|<x<2|x|$ implies $(|x|-1)^2<1+x+x^2<(|x|+1)^2$ so $f_3(x)$ can only be the square $x^2$. This gives the other trivial solution $x=-1$.

4. For $n=4$, look at Monthly problem 11203 (Feb. 2006) or Exercise 1.10 in Edward's book Fermat's Last Theorem. The only solutions are $x=-1,0,1,7$.

5. For $n=5$, see Ed Burger's book Exploring The Number Jungle (Exercise 12.11). By comparing $4f_5(x)$ with $(2x^2+x)^2$ and $(2x^2+x+1)^2$, we find that the only solutions are $x=-1,0,3$.

6. For $n=6$, we factor $f_6(x)=f_2(x^3)f_3(x)$. By the formula $2=f_2(x^3)-(x-1)f_3(x)$ we see that $\gcd(f_2(x^3),f_3(x))$ divides 2. But $f_3(x)$ is always odd, so the gcd equals 1. This forces $f_3(x)$ to be a square so we end up with the trivial solutions $x=0,-1$.

7. For $n=7$, if $x>5$ we have $$(16x^3+8x^2+6x+5)^2< 256 f_7(x)< (16x^3+8x^2+6x+6)^2,$$ while for $x<-4$ we get $$(16x^3+8x^2+6x+5)^2< 256 f_7(x)< (16x^3+8x^2+6x+4)^2.$$ Check the values between and you find that there are only trivial solutions.

By this stage, elementary methods get tougher to push through.

• Can you please give me the exact title of Ribenboim's book? Thanks! Jan 16 '16 at 21:07
• @user72870 Catalan's Conjecture: Are 8 and 9 the Only Consecutive Powers?
– user940
Jan 16 '16 at 23:23

If $a=3$,then $n=0,1,4$ are all the solutions.

$p(3)=1+3+…+3^n=\frac{3^{n+1}-1}{3-1}=y^2,3^{n+1}-1=2y^2$

Denote $m=n+1,t=\sqrt{-2}$, then $$3^m=1+2y^2$$ $$(1+yt)(1-yt)=(1+t)^m(1-t)^m$$ We get $$1+yt=±(1+t)^m,1-yt=±(1-t)^m$$ so $$1=±\frac{(1+t)^m+(1-t)^m}{2},y=±\frac{(1+t)^m-(1-t)^m}{2t}$$ We get $m=1,2,5$, and $|y|=1,2,11$.

• do you have a proof that there is no solution for $m>5$ ? Apr 25 '13 at 11:16
• @mercio,yeah,I will edit it to make it complete. Apr 25 '13 at 11:19
• @mercio,well,I find this is not easy.. Apr 26 '13 at 8:50

There're lots of pairs: $$\,p(1,n^2)\,,\,\,\forall\,n\in\Bbb N\;,$$

$$\,p(3,1)=2^2\;,\;p(3,4)=11^2\;,\ldots$$

• Shouldn't be $p(1,n^2-1)$?
– P..
Apr 25 '13 at 16:28