Skip to main content
OlympiadHQ

Browse · MathNet

Print

IMO 2019 Shortlisted Problems

2019 counting and probability

Problem

Let be a positive integer. We say that a positive integer is -good if is divisible by for all positive integers with . Suppose is a positive integer such that is -good, but is not -good. Prove that is prime.
Solution
We first show that is -good if and only if is even, and for all primes . To start with, the condition that can be rewritten as saying that Suppose, on the one hand, there is a prime with . Take . Then there exist positive integers such that . If we take big enough, and then take , then and . Since , one of the terms of the numerator is , which is divisible by . Hence the -adic valuation of the numerator is at least , but that of the denominator is exactly . This means that , so . As , we get that , so is not -good. On the other hand, if for all primes we have , then every factor of is coprime to , and hence invertible modulo : hence is also invertible modulo . Then equation above reduces to: However, we can rewrite the left-hand side as follows: Provided that , if is even we deduce as needed. On the other hand, if is odd, and we take , then we will not have , so is not -good. This completes the claim. To conclude from here, suppose that is -good, but is not. Then is even, and for all primes , but there is a prime for which : so or . We cannot have , as that is even too, so we have : in other words, is prime.

---

Alternative solution.

We show only half of the claim of the previous solution: we show that if is -good, then for all primes . We do this with Lucas' theorem. Suppose that we have with . Then consider the expansion of in base ; there will be some digit (not the final digit) which is nonzero, because . Suppose it is the digit for . Now, as varies over the integers, runs over all residue classes modulo ; in particular, there is a choice of (with ) such that the digit of is (so and the digit of is 0. Consequently, but (by Lucas' theorem) so . Thus is not -good. Now we show directly that if is -good but fails to be so, then there must be a prime dividing for some , which also divides . Indeed, the ratio between and is . We know that there must be a choice of such that the former binomial coefficient is 1 modulo but the latter is not, which means that the given ratio must not be . If and are both coprime to then the ratio is 1, so that must not be the case. In particular, as any prime less than divides , it must be the case that either or is prime. However, we can observe that must be even by insisting that is prime (which is possible by Dirichlet's theorem) and hence . Thus cannot be prime, so must be prime.

Techniques

Algebraic properties of binomial coefficientsPolynomials mod pPrime numbers