Skip to main content
OlympiadHQ

Browse · MathNet

Print

IMO2024 Shortlisted Problems

2024 number theory

Problem

Let be a positive integer. We say that a polynomial with integer coefficients is -good if there exists a polynomial of degree 2 with integer coefficients such that is never divisible by for any integer . Determine all integers such that every polynomial with integer coefficients is an -good polynomial.
Solution
First, observe that no polynomial is -good (because always has roots modulo ) and the polynomial is not -good (because is always divisible by ).

Now, if is -good with some , then has no roots . Therefore, it certainly has no roots for , so must be -good. Consequently, it suffices to show that all polynomials are -good whenever is an odd prime, or .

We start by handling the case . We will construct a such that is never divisible by and is always odd; this will clearly show that is -good. Note that any function modulo must be either constant or linear - in other words, there are such that for all . If then set , and if then set ; in all cases, will satisfy the required properties.

It remains to prove that any polynomial is -good, where is an odd prime. We will prove that for any function defined , there is a quadratic with no roots such that for all ; the statement about then follows with replaced by . For the remainder of the proof, we will consider all equalities modulo .

Suppose that a function not satisfying the above exists; in other words, has the property that for any quadratic with no roots , there is some such that . Without loss of generality, we may assume that has no roots . To see why, suppose that for some , and let be the function such that for and . For any with no roots, we know that there is some such that , and so for that choice of . In particular, is also not -good.

Now, suppose first that there is some nonzero such that is not in the image of . Then we may take ; this quadratic is never equal to and is never zero. Thus, must be surjective onto the nonzero residues . There are choices for and nonzero residues , so there must be some such that , and is a bijection from the set of residues not equal to to the set of nonzero residues .

Now, note that we may choose any and with nonzero and replace with ; if there were some with no roots such that for all , then would work for . Choose and such that and ; such and must exist (we may take and ). Renaming to , we see that we may assume .

Let be a quadratic nonresidue . Choose such that , which must exist as the right hand side is nonzero and is not equal to . Choose , which is a quadratic nonresidue.

Consider . By definition, and , so there are no more than values in the image of . Choose some nonzero not in the image of , so is never equal to . The quadratic is never zero and also never equal to , which completes the proof.

---

Alternative solution.

Given a function such that is surjective onto the nonzero elements of and , we provide an alternative approach to construct a nonzero quadratic such that . Let be the smallest quadratic nonresidue (so is a square) and let vary over the nonzero elements ; we will show that it is possible to choose for some choice of . Note that any quadratic of this form will be nowhere zero.

Suppose that no such works. Then, for each , there exists such that . We may assume that , as if the equality holds for then it also holds for . However, implies , so must be a surjection from to the set of nonzero , and so this is a bijection. In particular, for each , there exists a unique such that .

We now have where the first equality follows because is surjective onto the nonzero residues , and the second equality follows from the definition of . The two products cancel, which means that .

However, we also get However, this is a contradiction as , which is not a quadratic residue (by our choice of ).

---

Alternative solution.

As in Solution 1, we will reduce to the case of being an odd prime and being a function with no roots which is surjective onto the set of nonzero residues , although we make no assumption about the values of and with .

We will again consider quadratics of the form , where for an arbitrary fixed quadratic nonresidue , and are nonzero , and is any residue .

For each fixed and , there must be pairs such that , because there must be exactly one value of for each . If any appears in no such pair then we are done, so assume otherwise. In other words, there must be exactly one such that there are two such , and for all other there is only one such .

Thus, for each , there is exactly one unordered pair such that for some we have ; in other words, there is exactly one unordered pair such that .

Now, we show that for each unordered pair there must be at least one pair such that . Indeed, let . There must be some such that ; this is because and both take nonzero values , so the intersection must be nonempty by the pigeonhole principle. Choosing and such that and gives the claim.

Note further that if and satisfy the relation, then the same is true for and because . Since is nonzero, this means that each pair corresponds to at least two pairs ( ). However, since there are pairs ( ) with nonzero and unordered pairs , each must correspond to exactly two pairs and for some .

Now, since the image of has only elements, there must be some such that . Choose any such that , so and so . There is such a pair for any nonzero , so there are at least such pairs, and this quantity is greater than for .

Finally, for the special case that , we observe that there must be at least one allowed value for for each , so there must exist such a quadratic by Lagrange interpolation.

Comment. We may also handle the case as follows. Recall that we may assume is nonzero and surjective onto , so the image of must be or in some order. Without loss of generality , so we either have or . In the first case, take , and in the second case take .

---

Alternative solution.

Again, we reduce to the case of being an odd prime and being a function ; we will show that there is a quadratic which is nowhere zero such that has no root. We can handle the case of separately as in Solution 3, so assume that .

We will prove the following more general statement: let be a prime and let be subsets of with for all . Then there exists a polynomial of degree at most such that for all . Indeed, applying this statement to the sets (and adding if necessary) produces a quadratic satisfying the desired property.

Choose the coefficients of uniformly at random from , and let be the random variable denoting the number of for which . Observe that for , we have To see why, let . If has size and is a -tuple, the probability that on is equal to ; for this follows by Lagrange interpolation, and for it follows from the case by summing. The expectation is therefore equal to the number of of size times the probability that for each , which is equal to the right hand side as each has size .

Now, observe that we have the identity , so This is negative for . Because for all integers , it then follows that with positive probability, which implies that there must exist some with for all , as desired.
Final answer
all positive integers n ≥ 3

Techniques

Polynomials mod pQuadratic residuesPigeonhole principlePolynomial interpolation: Newton, LagrangeExpected values