# What makes this polynomial a square number?

For which integer values of $$x$$ is $$x^4+x^3+x^2+x+1$$ a square number? Please include a proof that the polynomial cannot be a square number if $$x$$ is not one of your answer(s).

Source: a math olympiad prep question in Math Letter Vol.1 (1988), KAIST math problem solving club.

• An interesting note is that you can turn the cyclotomic polynomial equation into Bring-Jerrard form $u^5-u+(k^2-1)/k^{5/2}=0$ where $x=u\sqrt k$ and $k$ natural. Jan 13, 2021 at 11:19
• This is essentially a duplicate of this... Don't see why this is fit for puzzling over math. Jan 13, 2021 at 17:42
• @DonThousand Didn't notice such a very similar question was popped up so recently on Math.SE (though technically it has a different domain). IMHO, a math question may go Math or Puzzling, but Math is better if the OP doesn't know the solution, and Puzzling is better if OP knows the solution and that the solution is interesting. Jan 13, 2021 at 23:37

Of course, $$x=0$$ is an answer, so let's look for non-zero ones from now on. If the given expression is a perfect square, so is

four times the number, which is $$4x^4+4x^3+4x^2+4x+4$$.

Now we try to estimate it by "nearby" perfect squares.

In particular, the square of $$(2x^2+x)$$ is $$4x^4+4x^3+x^2$$, which is "obviously" too small. But the square of $$(2x^2+x+2)^2$$ is $$4x^4+4x^3+9x^2+4x+4$$, and that's "obviously" too big. Thus the only possibility is the perfect square between them, $$(2x^2+x+1)^2$$. Solving the equation $$(2x^2+x+1)^2=4x^4+4x^3+4x^2+4x+4$$ by usual methods, we get $$x=3$$ and $$x=-1$$ as the only roots.

One could rightly object against the "obviously"s above since we are dealing with possibly negative numbers here. Fortunately, this is easily settled:

We see that $$(4x^4+4x^3+4x^2+4x+4)-(2x^2+x)^2=\frac13 (3x+2)^2+\frac83>0,$$ and that $$(4x^4+4x^3+4x^2+4x+4)-(2x^2+x+2)^2=-5x^2<0$$for non-zero $$x$$, so the above bounds are all legal.

Thus all the possible $$x$$'s are

0,-1, and 3.

• The answer is correct, and this proof (even with unnecessary case split) seems more elegant than the reference solution! Jan 12, 2021 at 6:11
• Edited to get rid of unnecessary casework and add some more explanation. Jan 12, 2021 at 13:11
• @Ankoganit How did you come up with the idea to multiply the polynomial by 4? Jan 12, 2021 at 13:23
• @pajonk when I tried to estimate the square root of the original thing with trinonials, I ran into fractions: x^2+x/2+1 and the like. The only point of scaling up by 4 was to get rid of the fractions. Jan 12, 2021 at 13:37
• @Bubbler Could you add the refence solution (as community wiki maybe)? Jan 12, 2021 at 16:31

## Reference solution

Start by

setting the equation $$x^4+x^3+x^2+x+1 = y^2$$ for some integers $$x,y$$ and multiplying both sides by four: $$4x^4+4x^3+4x^2+4x+4 = (2y)^2$$

Then, observe that

$$(2x^2+x)^2 = 4x^4+4x^3+x^2 \\ (2x^2+x+1)^2 = 4x^4+4x^3+5x^2+2x+1$$ so we can rewrite the equation in two ways: $$(2y)^2 = (2x^2+x)^2 + 3x^2+4x+4 \\ (2y)^2 = (2x^2+x+1)^2 - (x^2-2x-3) = (2x^2+x+1)^2 - (x+1)(x-3)$$

Since there is no square number between two consecutive square numbers,

it follows that $$(2y)^2$$ cannot be a square number if $$3x^2+4x+4>0$$ and $$(x+1)(x-3)>0$$. The former is always true (since $$3x^2+4x+4 = x^2+2(x+1)^2+2$$), and the latter is true if $$x<-1$$ or $$x>3$$.

Therefore, we reduce the search range to

$$-1 \le x \le 3$$,

and by testing each number in this range, we conclude that the only answers are

-1, 0, 3.

• I actually find this (very slightly) more elegant than @Ankoganit's (by no means bad) solution because it doesn't split cases and because it doesn't require solving a quadradic equation. Of course all very minor things. Jan 13, 2021 at 2:38
• @PaulPanzer I felt the reference is less elegant because it involves solving a quadratic inequality with the same polynomial, and uses brute force at the end. Jan 13, 2021 at 3:26
• Did you just call checking 5 small numbers "brute force"? ;-P Jan 13, 2021 at 3:34

the polynomial cannot be a square number

Proof

Let $$x^4 + x^3 + x^2 + x + 1 = y^2$$ with $$x, y$$ integers.
Now let $$y = ax^2 + bx + c$$, since $$y$$ need not be more than degree 2 in $$x$$.
Therefore, $$y^2 = a^2x^4 + 2abx^3 + (2ac + b^2)x^2 + 2bcx + c^2$$.
Now we have a system of equations,
1 = a^2,
1 = 2ab,
1 = 2ac + b^2,
1 = 2bc,
1 = c^2,
which has no solution. Therefore, for integer $$x$$ the polynomial cannot be square.

• There is a difference between being a square number and a square of a polynomial. For example, the polynomial y=5x^2+4 passes through some squares (e.g. 4 for x=0 and 9 for x=1 or -1) but is not itself a square of another polynomial (a^2=5, 2ab=0, b^2=4 has no solutions if we consider it as (ax+b)^2). Jan 12, 2021 at 6:03
• Oh I see how this argument is incorrect now
– Jay
Jan 12, 2021 at 6:57