Maths Olympiad Prep

Library / /231 of 348

Number theory Difficulty 5.0 AIME Find the answer

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}.

A number or a short expression. Spacing and $ signs are ignored.

Solution

Note that 1 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 x,2xnx, 2 \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 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 2 p. We now claim that an=2pna_{n}=2 p-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+an2 q \leq n+a_{n}. To finish, we claim that 2qn2 q \geq n, which would be implied by 2(an+2)np3n/412\left(a_{n}+2\right) \geq n \Longleftrightarrow p \geq 3 n / 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-(2 p-n)=2(n-p). Therefore, the answer is twice the largest difference between two primes less than 100. This difference is 8 (from 89 to 97), so the answer is 16. Since this is greater than 11, 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: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.