1. ## Tough & Beautiful!

I don't know that much about number theory but those who do might have seen this problem. See if you can solve it:

Suppose $p(x) \in \mathbb{Z}[x]$ has this property that $p(n)$ is a perfect square for all $n \in \mathbb{Z}.$ Prove that $p(x)=(q(x))^2,$ for some $q(x) \in \mathbb{Z}[x].$

2. I've been thinking about this problem for days! I really want to solve it. I had a fledgling idea that used Eisenstein's criterion but I convinced myself that I was misusing the theorem. Still working on it though!

3. I have been thinking about this problem on and off for a while, without getting very far. Even the very simplest case, when the polynomial is quadratic, seems less than obvious.

So suppose that $p(x) = ax^2 + bx + c$ is a square for all integers x. (Notice in passing that p(x) can take quite a lot of square values without being the square of a linear polynomial. For example, $60x^2-60x+1$ is a square when x = –2, –1, 0, 1, 2 and 3.)

Let $y^2 = ax^2+bx+c$. Clearly a>0, otherwise the quadratic would become negative for large x. We can factorise this equation over the reals as

$\Bigl(\sqrt a x+y + \frac b{2\sqrt a}\Bigr)\Bigl(\sqrt a x-y + \frac b{2\sqrt a}\Bigr) = \frac{b^2-4ac}{4a}.\qquad(*)$

If x is very large then so is y, so the first of the factors on the left side of (*) will be very large, and the second factor will be very small. Thus $\sqrt a x + \tfrac b{2\sqrt a}$ will be close to the integer y. If a is not a perfect square then the values of the fractional part of $\sqrt a x$ will be densely distributed over the unit interval as $x\to\infty$, so they cannot all be close to the fractional part of $-\tfrac b{2\sqrt a}$ and hence $\sqrt a x + \tfrac b{2\sqrt a}$ cannot always be close to an integer. That is a contradiction, and it shows that a must be a square, $a=k^2$ say.

Now if we multiply (*) by 4a, we can write it as

$(2k^2x+2ky+b)(2k^2x-2ky+b) = b^2-4ac.\qquad(**)$

If $b^2-4ac\ne0$ then it only has finitely many factors, so (**) has only finitely many integer solutions. Since that is not the case, we must have $b^2=4ac$.

Going back to the polynomial $p(x) = ax^2+bx+c$, we know that $p(0)=c$ is a square, say $c=l^2$. Then $b^2=4ac=4k^2l^2$, so $b=\pm2kl$. Finally, $p(x) = k^2x^2\pm2klx+l^2 = (kx\pm l)^2$, so p(x) is the square of an integer polynomial, as required.

That doesn't look like a hopeful approach for generalising to the case of higher degree polynomials. Perhaps it's time for NonCommAlg to shed a bit of light on this??

4. $p(x)$ has to be reducible. Maybe use proof by contradiction. Suppose $p(x)$ was not a "perfect square."

5. as far as i know, there are 3 or 4 proofs of this problem. here's a sketch of the "easiest" one:

suppose the claim is not true and let $P(x)$ be a counter-example. then:

1) we may assume that $\deg P(x) \geq 2$ and that $P(x)$ has no repeated roots. so if $\Delta$ is the discriminant of $P(x),$ then $\Delta \neq 0.$

2) for any (positive) integer $m$ there exist a prime number $p$ and an integer $n$ such that $p \mid P(n)$ and $p \nmid m.$ (why?)

3) for $m=\Delta$ let $p$ and $n$ be as mentioned in 2). since $P(n)$ is a perfect square, we have $p^2 \mid P(n).$ thus $p^2 \mid P(n+p) - pP'(n).$

4) $p \mid P(n)$ and $p \nmid \Delta$ implies that $p \nmid P'(n).$ (why?) therefore $p^2 \nmid P(n+p),$ by 3), and so $P(n+p)$ is not a perfect square. Q.E.D.