Maths Olympiad Prep

Library / /51 of 62

Number theory Difficulty 6.1 National Olympiad Prove it United States

Problem:

For each positive integer nn, let ana_{n} be the smallest nonnegative integer such that there is only one positive integer at most nn that is relatively prime to all of n,n+1,,n+ann, n+1, \ldots, n+a_{n}. If n<100n<100, compute the largest possible value of nann-a_{n}.

Solution

Solution:

Note that 11 is relatively prime to all positive integers. Therefore, the definition of ana_{n} can equivalently be stated as: "ana_{n} is the smallest nonnegative integer such that for all integers xx, 2xn2 \leq x \leq n, xx shares a prime factor with at least one of n,n+1,,n+ann, n+1, \ldots, n+a_{n}."

The condition is equivalent to the statement that the integers from nn to n+ann+a_{n} must include multiples of all primes less than nn. Therefore, if pp is the largest prime satisfying p<np < n, then n+an2pn + a_{n} \geq 2p.

We now claim that an=2pna_{n} = 2p - n works for all n>11n > 11. For all primes qq at most an+1a_{n} + 1, it is apparent that n,n+1,,n+ann, n+1, \ldots, n+a_{n} indeed contains a multiple of qq. For primes an+1<qpa_{n} + 1 < q \leq p, we then find that 2qn+an2q \leq n + a_{n}. To finish, we claim that 2qn2q \geq n, which would be implied by 2(an+2)np3n/412(a_{n} + 2) \geq n \Longleftrightarrow p \geq 3n/4 - 1. This is indeed true for all 11<n<10011 < n < 100.

We therefore wish to maximize nan=n(2pn)=2(np)n - a_{n} = n - (2p - n) = 2(n - p). Therefore, the answer is twice the largest difference between two primes less than 100100. This difference is 88 (from 8989 to 9797), so the answer is 1616. Since this is greater than 1111, we have not lost anything by ignoring the smaller cases.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.