Maths Olympiad Prep

Track / Stage 7 / 117 of 300 #1517 of 1964

Problem 1517

National olympiad second round; IMO P1/P4
Number theory Difficulty 7.2 Prove it

Show that there is a set of 20022002 consecutive positive integers containing exactly 150150 primes. (You may use the fact that there are 168168 primes less than 10001000)

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Official solution

1. We start by considering the factorial of a large number, specifically 2004!2004!. The factorial 2004!2004! is the product of all positive integers up to 20042004. This means that 2004!2004! is divisible by every integer from 11 to 20042004.

2. Consider the sequence of numbers 2004!+2,2004!+3,,2004!+20042004! + 2, 2004! + 3, \ldots, 2004! + 2004. Each of these numbers can be written as 2004!+k2004! + k where 2k20042 \leq k \leq 2004. Since 2004!2004! is divisible by kk, 2004!+k2004! + k is also divisible by kk. Therefore, none of these numbers can be prime because they all have a divisor other than 11 and themselves.

3. Next, we use the given fact that there are 168168 primes less than 10001000. This means that in the set of the first 10001000 positive integers, there are 168168 primes.

4. Define p(n)p(n) as the number of primes in the set {n,n+1,,n+2001}\{n, n+1, \ldots, n+2001\}. We need to show that there exists an nn such that p(n)=150p(n) = 150.

5. Note that the function p(n)p(n) changes gradually as nn increases. Specifically, p(n)p(n+1)1|p(n) - p(n+1)| \leq 1 because the set {n+1,n+2,,n+2002}\{n+1, n+2, \ldots, n+2002\} is almost the same as the set {n,n+1,,n+2001}\{n, n+1, \ldots, n+2001\}, differing only by the inclusion of n+2002n+2002 and the exclusion of nn.

6. We know that p(1)150p(1) \geq 150 because there are 168168 primes less than 10001000, and the set {1,2,,2001}\{1, 2, \ldots, 2001\} includes all these primes.

7. We also know that p(2004!+2)<150p(2004! + 2) < 150 because the set {2004!+2,2004!+3,,2004!+2003}\{2004! + 2, 2004! + 3, \ldots, 2004! + 2003\} contains no primes, and the number of primes in the set {2004!+2,2004!+3,,2004!+2001}\{2004! + 2, 2004! + 3, \ldots, 2004! + 2001\} is less than 150150.

8. Since p(n)p(n) changes by at most 11 as nn increases and p(1)150p(1) \geq 150 while p(2004!+2)<150p(2004! + 2) < 150, by the Intermediate Value Theorem, there must be some nn in the range from 11 to 2004!+22004! + 2 such that p(n)=150p(n) = 150.

Therefore, there exists a set of 20022002 consecutive positive integers containing exactly 150150 primes.

\blacksquare

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.