Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Are there any positive $n$ for which $ n^4+n^3+n^2+n+1$ is a perfect square?

I tried to simplify

\begin{align*} n^4+n^3+n^2+n+1 &= n^2(n^2+1)+n(n^2+1)+1\\ &= (n^2+n)(n^2+1)+1 \\ &= n(n+1)(n^2+1)+1 \end{align*} Then I assumed that the above expression is a square; then

$$ n(n+1)(n^2+1)+1 = k^2$$

$$ \begin{align*} n(n+1)(n^2+1) &= (k^2-1) \\ &= (k+1)(k-1) \end{align*} $$

Then trying to reason with prime factors, but cannot find a concrete proof yet.

share|cite|improve this question
$n=0$ and $n=-1$ both work. – Henning Makholm Mar 3 '12 at 19:43
Ribenboim's book on Catalan's conjecture has a detailed analysis of the Diophantine equation $v^2=1+x+x^2+\cdots+x^{n−1}$. The only non-trivial solutions are $n=5,x=3$ and $n=4,x=7$. By non-trivial, I mean $|x|>1$. – Byron Schmuland Mar 3 '12 at 20:43
Wow! that was very useful to know – Sam Mar 3 '12 at 21:39
$n^4 + 4 n^3 + 6 n^2 + 4 n + 1$ works better. – Will Jagy Mar 3 '12 at 21:49
which is $(n+1)^4 = \left(\left(n+1\right)^2\right)^2$ – Sam Mar 3 '12 at 23:08

Assuming you want positive integers $n$,

I believe we can show that

$$(2n^2 + n)^2 \lt 4(n^4 + n^3 + n^2 + n + 1) \lt (2n^2 + n + 1)^2$$

for $n \gt 3$.

Note: A similar inequality can be given for negative $n$.

share|cite|improve this answer
Yes $n$ is positive integer. – Sam Mar 3 '12 at 19:46
Since you need $n^2>2n+3$, you must have $n>3$. Note in particular, when $n=3$, $n^4+n^3+n^2+n+1=121=11^2$. – Eric Naslund Mar 3 '12 at 19:53
Yes I got it Aryabhata. That was a fantastic hint. – Sam Mar 3 '12 at 19:56
I did get for n=3, but proving that it cannot have any other $n$ is where I can use Aryabhata's hint. – Sam Mar 3 '12 at 19:56
Thanks Eric and Aryabhata – Sam Mar 3 '12 at 20:00

enter image description here

Here is my answer!

H. Bensom, Germany

share|cite|improve this answer
Your answer is very confusingly written and the special case you found ($n=3$) is already included in Byron Schmuland's comment. – Joonas Ilmavirta Sep 5 '14 at 13:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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