Problem:
For each positive integer , let be the smallest nonnegative integer such that there is only one positive integer at most that is relatively prime to all of . If , compute the largest possible value of .
Problem:
For each positive integer , let be the smallest nonnegative integer such that there is only one positive integer at most that is relatively prime to all of . If , compute the largest possible value of .
Solution:
Note that is relatively prime to all positive integers. Therefore, the definition of can equivalently be stated as: " is the smallest nonnegative integer such that for all integers , , shares a prime factor with at least one of ."
The condition is equivalent to the statement that the integers from to must include multiples of all primes less than . Therefore, if is the largest prime satisfying , then .
We now claim that works for all . For all primes at most , it is apparent that indeed contains a multiple of . For primes , we then find that . To finish, we claim that , which would be implied by . This is indeed true for all .
We therefore wish to maximize . Therefore, the answer is twice the largest difference between two primes less than . This difference is (from to ), so the answer is . Since this is greater than , we have not lost anything by ignoring the smaller cases.