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

  • $\begingroup$ $p(x)=\displaystyle\frac{x^{n+1}-1}{x-1}$ $\endgroup$
    – Berci
    Apr 25 '13 at 10:39
  • $\begingroup$ I know, but what can we do with that? $\endgroup$
    – user72870
    Apr 25 '13 at 10:42
  • $\begingroup$ If $a=3$,then $n=0,1,4$ are all the solutions. $\endgroup$
    – lsr314
    Apr 25 '13 at 11:00
  • $\begingroup$ @Sophie Can you show us the proof? $\endgroup$
    – user72870
    Apr 25 '13 at 11:03
  • $\begingroup$ 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$. $\endgroup$ 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.

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

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


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

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

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


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.