A positive integer is called balanced if it is not a prime and for any integer in the interval the number of ways to choose persons from a group of people is divisible by . If and are balanced five digit positive integers find the smallest value of the difference .
, 2022
Solution
Answer. 202. As in problem 9.3 we obtain that any 5-digit balanced number is of the forms: or where and are primes. Since it follows that the smallest positive difference between two 5-digit numbers equals where is the smallest prime number for which is also a prime and and are 5-digit numbers. The smallest 5-digit number is , i.e, we want . Direct verification shows that 101 and 103 are both prime numbers. The corresponding 5-digit balanced numbers are and with difference .
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.