Skip to main content
OlympiadHQ

Browse · MathNet

Print

IMO2024 Shortlisted Problems

2024 number theory

Problem

Find all positive integers with the following property: for all positive divisors of , we have that or is prime.
Solution
It is easy to verify that all work. We must show they are the only possibilities. We write , where is a nonnegative integer and is odd. Since , either is prime or .

In the former case, since is even it must be , so . If , we get a contradiction, since but . Hence , so .

In the latter case, we have and coprime to , and hence . This means that with (since gives , which was considered earlier).

Then we have : since is odd, it would have to divide but is larger than . Hence, by the condition of the problem, is prime. If , must be as well, and this gives the solution . Also, for : since it is odd, it would have to divide . However, we have no solutions to with : the left-hand side is greater than the right unless , when the left-hand side is just over half the right-hand side.

Since we have and , and and , we must have and both prime. However, is a multiple of three if is odd, so we must have (impossible as this gives ) or , which gives , whence .

---

Alternative solution.

We proceed as in Solution 1 as far as determining that with .

Now, we have but , as it is odd and does not divide . Thus is prime. The theory of Fermat primes tells us we must have with .

Then is congruent to or (modulo ) depending on whether is odd or even, respectively. In particular it is not divisible by , so is not divisible by ; so we must have , since if then but with not prime.

---

Alternative solution.

Let be the smallest integer not dividing . Since is a divisor of , must be a prime. Let be the remainder of modulo . Since , we have , so we may consider the divisor .

Since , we have , whence . Thus ; so it must be prime. On the other hand, this prime is divisible by , so we conclude , which means that .

Then from we get , from which we find Solving this quadratic inequality gives , which means that . Of this set, and are not solutions.

---

Alternative solution.

We suppose that is not or . Since and , we know that is prime. Thus it is odd, so ; as , we have and , so is prime. Thus it is also odd, so .

We must then have or prime.

In the former case, , so . This means that or .

In the latter case, must be odd if . Thus we have where are all prime; does not work, so (otherwise one of those numbers would be divisible by ). Thus , so as is not prime.

Now suppose that is the least positive integer not dividing : as in Solution 3 we know that is prime, and what we have done so far shows that . If is the product of coprime integers less than , it divides , and is not prime so also divides (a contradiction); and are even and have no common factor higher than , so all odd prime power divisors of their product are less than and the only case where is not a product of coprime integers less than is when one of and is a power of , say (with ). If , then and is an odd integer less than , so and so . Finally, if , then is even and is a multiple of ; the only case where it is a power of is when , but we have , so is a product of coprime integers less than and again we have a contradiction.

---

Alternative solution.

As in Solution 4, we deduce that if then must be even. We write , where is a nonnegative integer and .

Since and are both different and nonzero modulo , one of them must be congruent to modulo . We'll say that it is , where .

Since , we must have that is either prime or a factor of . In the first case, because , and so , where is or . Noting that we must have (else but ), we can examine cases to deduce that are the only possibilities.

Otherwise, . Since is coprime to , we must in fact have that , and since by assumption we deduce that . In particular, is an even number that is at least , so is not prime and must divide . As it is coprime to , we must in fact have .

Let and be such that and . We have that and , and multiplying these together gives .

If then , so , which is not possible (considering both sides modulo ).

If then must be equivalent to modulo , so gives that is equivalent to modulo , whence . So we deduce that . Thus, we deduce that , which rearranges to give , whence and so . We can examine cases to deduce that is the only possibility.
Final answer
1, 2, 4, 12

Techniques

Prime numbersFermat / Euler / Wilson theoremsLinear and quadratic inequalities