7

I have a problem with the following task.

Let $W(n) := an^2 + bn + c$ where $a,b,c \in \mathbb{Z}$.
Assume that for all $n \in \mathbb Z$ we have that $W(n)$ is the square of an integer.

Show that there exists some $P$ such that $W(n) = P(n)^2$.

Thanks for any tips or help.

John

Fly by Night
  • 32,272
  • 2
    In order to get the best possible answers, it is helpful if you say in what context you encountered the problem, and what your thoughts on it are; this will prevent people from telling you things you already know, and help them give their answers at the right level. Also, many find the use of imperative ("Prove", "Solve", etc.) to be rude when asking for help; please consider rewriting your post. – Julian Kuelshammer Oct 14 '12 at 12:47
  • 2
    @JulianKuelshammer: Don't be too harsh. Obviously the "Show that" is part of a verbatim quotation introduced by the first introductory sentence. But I agree on the other points. – Hagen von Eitzen Oct 14 '12 at 13:04
  • Was that "harsh"? – DonAntonio Oct 14 '12 at 13:06
  • 2
    @DonAntonio: No, $4x^2+4x+1=(2x+1)^2$ is a square wnhenever $x$ is an integer, but has no integer root. Also (though that does not affect the problem), $W(x)=2x^2+4x+2$ has $\Delta=0$, but $W(0)=2$ is not a square. – Hagen von Eitzen Oct 14 '12 at 13:11
  • @HagenvonEitzen: Now after the edit this is clear. +1 – Julian Kuelshammer Oct 14 '12 at 13:15
  • Hagen's right: it goes only one direction. – DonAntonio Oct 14 '12 at 13:17
  • @JulianKuelshammer: Oh, I see - I had not checked the version as it was when you commented. – Hagen von Eitzen Oct 14 '12 at 13:17
  • for every $x$ where ?? – Belgi Oct 14 '12 at 14:39
  • 1
    In fact, even more is true - the result turns out to be true for polynomials of arbitrary degree and in arbitrarily many variables (and there's even an effective version that 'forces' a nonsquare value less than a specific bound for non-square polynomials). See http://www.mast.queensu.ca/~murty/poly2.pdf for the details, and a relatively straightforward proof of the univariate case. – Steven Stadnicki Oct 15 '12 at 18:29

3 Answers3

3

Without loss of generality, you can assume $a,b,c\geq 0$. Since

$$ 4a W(x) - (2ax+b)^2 = 4ac - b^2 = D, $$

we have that the Pell equation

$$ 4a u^2 - v^2 = D, $$

for any $N$ big enough, has at least $\left\lfloor\frac{N}{2a}\right\rfloor$ integer solutions $(u,v)$ with $|v|\leq N$. From the theory of Pell equation we know that, if $D\neq 0$, there are at most $O(\log N)$ solutions with $|v|\leq N$, so

$$ D=0, \quad a=A^2, \quad c=W(0)=C^2, \quad W(x)=(Ax+C)^2 $$

must hold.

Jack D'Aurizio
  • 353,855
1

We have a (possibly nonpolynomial) function $w\colon\mathbb Z\to \mathbb N_0$ such that $W(x)=w(x)^2$ for all $x\in \mathbb Z$.

If $a<0$ then $W(x)<0$ for sufficiently big $x$. Hence $a\ge 0$. If $a=0$ and $b\ne 0$, then again $W(x)<0$ for suitable $x$. Hence $a=0$ implies $b=0$, but then $W(x)=W(0)=(w(0))^2$ as desired. Therefore we may assume for the rest of the argument that $a\ne 0$.

If $x$ is big, then $w(x)\approx x\sqrt a$. More precisely, if $\alpha,\beta$ are positive real numbers, then from $\alpha^2-\beta^2=(\alpha-\beta)(\alpha+\beta)$ we see that $|\alpha-\beta|\le\frac{|\alpha^2-\beta^2|}\alpha$. Therefore, from $(x\sqrt a+\frac{b}{2\sqrt a})^2-w(x)^2=\frac{b^2}{4a}-c$, we conclude $$\tag1w(x)=x\sqrt a +\frac b{2\sqrt a}+O(x^{-1}).$$

If $b=c=0$, then $a=w(1)^2$ and we have $W(x)=(w(1)x)^2$ as desired. Therefore we may assume that $b\ne0$ or $c\ne 0$, hence we can consider $d=\gcd(b,w(0))$ and write $b=du$, $c=d^2v^2$ with $u,v\in\mathbb Z$. Then if $p|v$, we have that $W(p)=ap^2+dup+c$ is a multiple of $p$, but not of $p^2$, contradicting squareness. Consequently, $v=1$, $d=w(0)$, $c=d^2$ and $d|b$.

As $W(\pm d)=ad^2\pm ud^2+d^2$ is divisible by $d^2$, we see that $w(\pm d)$ is divisible by $d$ and $2u=\left(\frac {w(d)}{d}\right)^2-\left(\frac{w(-d)}{d}\right)$ is the difference of two squares. But if a difference of squares is even, it is also a multiple of four. We conclude that $u$ is even. Therefore write $b=2dh$ with $h\in\mathbb Z$. Then $$\tag2W(x) = ax^2+2dhx+d^2=(hx+d)^2+(a-h^2)x^2.$$ Thus if $h^2=a$, we are done. Therefore assume that $h\ne \pm\sqrt a$. From $(2)$ we obtain $(a-h^2)x^2=(w(x)+hx+d)(w(x)-hx-d)$. Thus $(a-h^2)x^2$ has factors $w(x)+hx+d=(\sqrt a +h)x+O(1)$ and $w(x)-hx-d=(\sqrt a -h)x+O(1)$. As $x\to \infty$, both factors are unbounded, hence for a large enough prime $x$, each factor exceeds $a^2-h$ (in absolute value) and hence must be divisible by $x$ (but not $x^2$). After dividing out $x$, this implies that $a-h^2$ has integer factors $\sqrt a +h+O(x^{-1})$ and $\sqrt a -h+O(x^{-1})$. As $x$ can grow arbitrary large, $\sqrt a\pm h$ must be integer, especially $n:=\sqrt a$ is an integer. But then from $(1)$ we have $\frac{b}{2n}=w(x)-nx+O(x^{-1})$ and this implies that $m:=\frac{b}{2n}$ is an integer because $w(x)-nx$ is an integer and $O(x^{-1})$ arbitrarily small. We obtain $W(x)=(n x+m)^2+c-m^2$, hence $c-m^2 = (w(x)-nx-m)(w(x)+nx+m)$. The second factor is unbounded hence the first factor becomes arbitrarily small. But as it is an integer, this means that it becomes $0$ for large $x$. Therefore $c=m^2$ and $$W(x)=(n x+m)^2.$$

0

$W(x) = ax^2 + bx + c$ is analytic and positive over the positive reals so it's square root $F(x)$ is also. Set $C$ to be the integer $F(0)$ and note that $c = C^2$. The functions $F$ and $W$ have the same set of roots but a root of $F$ is a double root of $W$ thus $b^2 = 4aC^2$ this implies some integer $A$ such that $a^2 = A$ hence $W(x) = A^2 x^2 + 2AC x + C^2 = (Ax+C)^2$.