Olympiad Maths Prep

Track / Stage 9 / 69 of 80 #1949 of 2000

Problem 1949

IMO P2/P5; hard shortlist
Number theory Difficulty 9.2 Prove it IMO2024 Shortlisted Problems · IMO

Let nn be a positive integer. We say that a polynomial PP with integer coefficients is nn-good if there exists a polynomial QQ of degree 2 with integer coefficients such that Q(k)(P(k)+Q(k))Q(k)(P(k)+Q(k)) is never divisible by nn for any integer kk.
Determine all integers nn such that every polynomial with integer coefficients is an nn-good polynomial.

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solutions — 4

Solution 1

First, observe that no polynomial is 11-good (because Q(X)(P(X)+Q(X))Q(X)(P(X)+Q(X)) always has roots modulo 11) and the polynomial P(X)=1P(X)=1 is not 22-good (because Q(X)(Q(X)+1)Q(X)(Q(X)+1) is always divisible by 22).

Now, if PP is dd-good with some QQ, then Q(P+Q)Q \cdot (P+Q) has no roots modd\bmod d. Therefore, it certainly has no roots modn\bmod n for dnd \mid n, so PP must be nn-good. Consequently, it suffices to show that all polynomials are nn-good whenever nn is an odd prime, or n=4n=4.

We start by handling the case n=4n=4. We will construct a QQ such that Q(X)Q(X) is never divisible by 44 and Q(X)+P(X)Q(X)+P(X) is always odd; this will clearly show that PP is 44-good. Note that any function modulo 22 must be either constant or linear - in other words, there are a,b{0,1}a, b \in \{0,1\} such that P(X)=aX+bmod2P(X)=a X+b \bmod 2 for all XX. If a=0a=0 then set Q(X)=4X2+b+1Q(X)=4 X^{2}+b+1, and if a=1a=1 then set Q(X)=X2+b+1Q(X)=X^{2}+b+1; in all cases, QQ will satisfy the required properties.

It remains to prove that any polynomial is pp-good, where pp is an odd prime. We will prove that for any function ff defined modp\bmod p, there is a quadratic QQ with no roots modp\bmod p such that Q(x)f(x)modpQ(x) \neq f(x) \bmod p for all xx; the statement about PP then follows with ff replaced by P-P. For the remainder of the proof, we will consider all equalities modulo pp.

Suppose that a function ff not satisfying the above exists; in other words, ff has the property that for any quadratic QQ with no roots modp\bmod p, there is some xx such that Q(x)=f(x)Q(x)=f(x). Without loss of generality, we may assume that ff has no roots modp\bmod p. To see why, suppose that f(u)=0f(u)=0 for some uu, and let gg be the function such that g(x)=f(x)g(x)=f(x) for xux \neq u and g(u)=1g(u)=1. For any QQ with no roots, we know that there is some xux \neq u such that P(x)=f(x)P(x)=f(x), and so P(x)=g(x)P(x)=g(x) for that choice of xx. In particular, gg is also not pp-good.

Now, suppose first that there is some nonzero tt such that tt is not in the image of ff. Then we may take Q(X)=pX2+tQ(X)=p X^{2}+t; this quadratic is never equal to ff and is never zero. Thus, ff must be surjective onto the nonzero residues modp\bmod p. There are pp choices for XX and p1p-1 nonzero residues modp\bmod p, so there must be some x1x2modpx_{1} \neq x_{2} \bmod p such that f(x1)=f(x2)f\left(x_{1}\right)=f\left(x_{2}\right), and ff is a bijection from the set of residues modp\bmod p not equal to x2x_{2} to the set of nonzero residues modp\bmod p.

Now, note that we may choose any bb and cc with bb nonzero and replace f(X)f(X) with g(X)=f(bX+c)g(X)= f(b X+c); if there were some QQ with no roots such that Q(x)g(x)Q(x) \neq g(x) for all xx, then Q(X/bc/b)Q(X / b-c / b) would work for ff. Choose bb and cc such that bx1+c=1b x_{1}+c=1 and bx2+c=1b x_{2}+c=-1; such bb and cc must exist (we may take b=2/(x1x2)b=2 /(x_{1}-x_{2}) and c=(x1+x2)/(x2x1)c=(x_{1}+x_{2}) /(x_{2}-x_{1}) ). Renaming gg to ff, we see that we may assume f(1)=f(1)f(1)=f(-1).

Let rr' be a quadratic nonresidue modp\bmod p. Choose y0y \neq 0 such that f(y)=(1r)f(0)f(y)=(1-r') f(0), which must exist as the right hand side is nonzero and 1r1-r' is not equal to 11. Choose r=y2/rr=y^{2} / r', which is a quadratic nonresidue.

Consider ϕ(X)=f(X)/(X2r)\phi(X)=f(X) /(X^{2}-r). By definition, ϕ(1)=ϕ(1)\phi(1)=\phi(-1) and ϕ(0)=ϕ(y)\phi(0)=\phi(y), so there are no more than p2p-2 values in the image of ϕ\phi. Choose some nonzero aa not in the image of ϕ\phi, so f(X)/(X2r)f(X) /(X^{2}-r) is never equal to aa. The quadratic Q(X)=a(X2r)Q(X)=a(X^{2}-r) is never zero and also never equal to f(X)f(X), which completes the proof.

Solution 2

Given ff a function modp\bmod p such that ff is surjective onto the nonzero elements of Z/pZ\mathbb{Z} / p \mathbb{Z} and f(1)=f(1)f(1)=f(-1), we provide an alternative approach to construct a nonzero quadratic Q(X)Q(X) such that Q(X)f(X)Q(X) \neq f(X). Let rr be the smallest quadratic nonresidue modp\bmod p (so r1r-1 is a square) and let aa vary over the nonzero elements modp\bmod p; we will show that it is possible to choose Qa(X)=a(X2r)Q_{a}(X)=a(X^{2}-r) for some choice of aa. Note that any quadratic of this form will be nowhere zero.

Suppose that no such QaQ_{a} works. Then, for each aa, there exists xx such that a(x2r)=f(x)a(x^{2}-r)=f(x). We may assume that x1x \neq -1, as if the equality holds for x=1x=-1 then it also holds for x=1x=1. However, a(x2r)=f(x)a(x^{2}-r)=f(x) implies a=f(x)/(x2r)a=f(x)/(x^{2}-r), so f(x)/(x2r)f(x)/(x^{2}-r) must be a surjection from {x1}\{x \neq -1\} to the set of nonzero aa, and so this is a bijection. In particular, for each aa, there exists a unique xax_{a} such that f(xa)=a(xa2r)f(x_{a})=a(x_{a}^{2}-r).

We now have
t0t=a0f(xa)=a0aa0(xa2r)=a0ax1(x2r) \begin{aligned} \prod_{t \neq 0} t & =\prod_{a \neq 0} f(x_{a}) \\ & =\prod_{a \neq 0} a \prod_{a \neq 0}(x_{a}^{2}-r) \\ & =\prod_{a \neq 0} a \prod_{x \neq -1}(x^{2}-r) \end{aligned}
where the first equality follows because ff is surjective onto the nonzero residues modp\bmod p, and the second equality follows from the definition of xax_{a}. The two products cancel, which means that x1(x2r)=1\prod_{x \neq -1}(x^{2}-r)=1.

However, we also get
x1(x2r)=(r)(1r)(x=2(p1)/2(x2r))2. \prod_{x \neq -1}(x^{2}-r)=(-r)(1-r)\left(\prod_{x=2}^{(p-1)/2}(x^{2}-r)\right)^{2} .
However, this is a contradiction as r(1r)=r(r1)-r(1-r)=r(r-1), which is not a quadratic residue (by our choice of rr ).

Solution 3

As in Solution 1, we will reduce to the case of pp being an odd prime and ff being a function modp\bmod p with no roots which is surjective onto the set of nonzero residues modp\bmod p, although we make no assumption about the values of x1x_{1} and x2x_{2} with f(x1)=f(x2)f(x_{1})=f(x_{2}).

We will again consider quadratics of the form Qa,b,c(X)=aR(bX+c)Q_{a, b, c}(X)=a R(b X+c), where R(X)=X2rR(X)=X^{2}-r for an arbitrary fixed quadratic nonresidue rr, aa and bb are nonzero modp\bmod p, and cc is any residue modp\bmod p.

For each fixed bb and cc, there must be nn pairs (a,x)(a, x) such that aR(bx+c)=f(x)a R(b x+c)=f(x), because there must be exactly one value of aa for each xx. If any aa appears in no such pair then we are done, so assume otherwise. In other words, there must be exactly one aa such that there are two such xx, and for all other aa there is only one such xx.

Thus, for each (b,c)(b, c), there is exactly one unordered pair {x1,x2}\{x_{1}, x_{2}\} such that for some aa we have f(xi)=aR(bxi+c)f(x_{i})=a R(b x_{i}+c); in other words, there is exactly one unordered pair {x1,x2}\{x_{1}, x_{2}\} such that f(x1)/R(bx1+c)=f(x2)/R(bx2+c)f(x_{1}) / R(b x_{1}+c)=f(x_{2}) / R(b x_{2}+c).

Now, we show that for each unordered pair {x1,x2}\{x_{1}, x_{2}\} there must be at least one pair (b,c)(b, c) such that f(x1)/R(bx1+c)=f(x2)/R(bx2+c)f(x_{1}) / R(b x_{1}+c)=f(x_{2}) / R(b x_{2}+c). Indeed, let t=f(x1)/f(x2)t=f(x_{1}) / f(x_{2}). There must be some x1,x2x_{1}', x_{2}' such that R(x1)/R(x2)=tR(x_{1}') / R(x_{2}')=t; this is because R(X)R(X) and tR(X)t R(X) both take p+12\frac{p+1}{2} nonzero values modp\bmod p, so the intersection must be nonempty by the pigeonhole principle. Choosing bb and cc such that bx1+c=x1b x_{1}+c=x_{1}' and bx2+c=x2b x_{2}+c=x_{2}' gives the claim.

Note further that if (b,c)(b, c) and {x1,x2}\{x_{1}, x_{2}\} satisfy the relation, then the same is true for (b,c)(-b,-c) and {x1,x2}\{x_{1}, x_{2}\} because R(bx+c)=R(bxc)R(b x+c)=R(-b x-c). Since bb is nonzero, this means that each pair {x1,x2}\{x_{1}, x_{2}\} corresponds to at least two pairs ( b,cb, c ). However, since there are p(p1)p(p-1) pairs ( b,cb, c ) with bb nonzero and p(p1)/2p(p-1) / 2 unordered pairs {x1,x2}\{x_{1}, x_{2}\}, each {x1,x2}\{x_{1}, x_{2}\} must correspond to exactly two pairs (b,c)(b, c) and (b,c)(-b,-c) for some (b,c)(b, c).

Now, since the image of ff has only p1p-1 elements, there must be some x1,x2x_{1}, x_{2} such that f(x1)=f(x2)f(x_{1})=f(x_{2}). Choose any b,cb, c such that bx1+c=(bx2+c)b x_{1}+c=-\left(b x_{2}+c\right), so R(bx1+c)=R(bx2+c)R(b x_{1}+c)=R(b x_{2}+c) and so f(x1)/R(bx1+c)=f(x2)/R(bx2+c)f(x_{1}) / R(b x_{1}+c)=f(x_{2}) / R(b x_{2}+c). There is such a pair b,cb, c for any nonzero bb, so there are at least p1p-1 such pairs, and this quantity is greater than 22 for p5p \geqslant 5.

Finally, for the special case that p=3p=3, we observe that there must be at least one allowed value for Q(x)Q(x) for each xx, so there must exist such a quadratic QQ by Lagrange interpolation.

Comment. We may also handle the case p=3p=3 as follows. Recall that we may assume ff is nonzero and surjective onto {1,2}mod3\{1,2\} \bmod 3, so the image of ff must be (1,1,2)(1,1,2) or (1,2,2)(1,2,2) in some order. Without loss of generality f(1)=f(2)f(1)=f(2), so we either have (f(0),f(1),f(2))=(1,2,2)(f(0), f(1), f(2))=(1,2,2) or (2,1,1)(2,1,1). In the first case, take Q(X)=2X2+2Q(X)=2 X^{2}+2, and in the second case take Q(X)=X2+1Q(X)=X^{2}+1.

Solution 4

Again, we reduce to the case of pp being an odd prime and ff being a function modp\bmod p; we will show that there is a quadratic which is nowhere zero such that Q(x)=f(x)Q(x)=f(x) has no root. We can handle the case of p=3p=3 separately as in Solution 3, so assume that p5p \geqslant 5.

We will prove the following more general statement: let p5p \geqslant 5 be a prime and let A1,A2,,Ap\mathcal{A}_1, \mathcal{A}_2, \ldots, \mathcal{A}_p be subsets of Z/pZ\mathbb{Z} / p \mathbb{Z} with Ai=2|\mathcal{A}_i|=2 for all ii. Then there exists a polynomial QZ/pZ[X]Q \in \mathbb{Z} / p \mathbb{Z}[X] of degree at most 22 such that Q(i)AiQ(i) \notin \mathcal{A}_i for all ii. Indeed, applying this statement to the sets Ai={0,f(i)}\mathcal{A}_i=\{0, f(i)\} (and adding pX2p X^{2} if necessary) produces a quadratic QQ satisfying the desired property.

Choose the coefficients of QQ uniformly at random from Z/pZ\mathbb{Z} / p \mathbb{Z}, and let TT be the random variable denoting the number of ii for which Q(i)AiQ(i) \in \mathcal{A}_i. Observe that for k3k \leqslant 3, we have
E[(Tk)]=2k(pk)pk. \mathbb{E}\left[\binom{T}{k}\right]=2^{k}\binom{p}{k} p^{-k} .
To see why, let k3k \leqslant 3. If SZ/pZ\mathcal{S} \subseteq \mathbb{Z} / p \mathbb{Z} has size kk and (ai)iS(a_i)_{i \in \mathcal{S}} is a kk-tuple, the probability that Q(i)=aiQ(i)=a_i on S\mathcal{S} is equal to pkp^{-k}; for k=3k=3 this follows by Lagrange interpolation, and for k<3k<3 it follows from the k=3k=3 case by summing. The expectation is therefore equal to the number of SZ/pZ\mathcal{S} \subseteq \mathbb{Z} / p \mathbb{Z} of size kk times the probability that Q(i)AiQ(i) \in \mathcal{A}_i for each iSi \in \mathcal{S}, which is equal to the right hand side as each Ai\mathcal{A}_i has size 22.

Now, observe that we have the identity (t1)(t3)(t4)=12+12(t1)10(t2)+6(t3)(t-1)(t-3)(t-4)=-12+12\binom{t}{1}-10\binom{t}{2}+6\binom{t}{3}, so
E[(T1)(T3)(T4)]=12+12E[(T1)]10E[(T2)]+6E[(T3)]=12+122102(11p)+643(11p)(12p)=4p+16p2 \begin{aligned} \mathbb{E}[(T-1)(T-3)(T-4)] & =-12+12 \mathbb{E}\left[\binom{T}{1}\right]-10 \mathbb{E}\left[\binom{T}{2}\right]+6 \mathbb{E}\left[\binom{T}{3}\right] \\ & =-12+12 \cdot 2-10 \cdot 2\left(1-\frac{1}{p}\right)+6 \cdot \frac{4}{3}\left(1-\frac{1}{p}\right)\left(1-\frac{2}{p}\right) \\ & =-\frac{4}{p}+\frac{16}{p^{2}} \end{aligned}
This is negative for p5p \geqslant 5. Because (t1)(t3)(t4)0(t-1)(t-3)(t-4) \geqslant 0 for all integers t>0t>0, it then follows that T=0T=0 with positive probability, which implies that there must exist some QQ with Q(i)AiQ(i) \notin \mathcal{A}_i for all ii, as desired.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.