Nice prime *is a prime equal to the difference of two cubes of positive integers.*
Find last digits of all nice primes.
Solution
Firstly, let us note that , and are nice primes, so 1, 7 and 9 belong to desired digits. We show that they are all desired digits.
Let be a nice prime, where are positive integers. Second factor in rewriting
is greater than 1, thus the first one is 1 and therefore . After substitution we obtain
An estimate gives that the prime is odd and greater than 5. This excludes 0, 2, 4, 5, 6 and 8 as the last digits and 3 stays the only remaining digit to exclude.
It is sufficient to find remainders of the numbers after division by 5. For remainders 0, 1, 2, 3 and 4 of we obtain remainders 1, 2, 4, 2, 1 of (1) which ones really exclude the last digit 3.
*Answer.* The last digits of the nice primes are 1, 7 and 9.
Looking for a route rather than an archive? The track puts 2,000
problems in a working order, from AMC 10 level to the IMO shortlist.