Determine if there exists a (three-variable) polynomial with integer coefficients satisfying the following property: A positive integer is not a perfect square if and only if there is a triple of positive integers such that .
(This problem was suggested by Gerhard Woeginger.)
Solution
The answer is yes. Suppose that is a polynomial with integer coefficients such that for all integers , we have
* ,
* if then is a non-square, and
* for each positive non-square , there exist with .
We claim that the polynomial
satisfies the desired property. Indeed, unless , in which case must be a non-square, so if is a positive integer, then it is a non-square. Further, for any positive non-square , choosing for which yields a triple for which . It remains only to show that such a polynomial exists. We present two approaches.
First approach:
For any , we have the following chain of five equivalent statements:
(i) is a positive non-square,
(ii) for some ,
(iii) for some ,
(iv) for some ,
(v) for some , where
satisfies the desired conditions.
Second approach:
It is well known that the Pell equation with parameter has a positive integer solution if and only if is not a square. Therefore the polynomial
also satisfies the desired conditions.
Remark. For any , the problem statement also works with “not a th power” instead of “not a square.” However, in this case the second approach breaks down because we can no longer use the theory of Pell equations.