Problem:
Let be a prime number. Find all possible values of the remainder when is divided by .
Solution
Solution:
The answers are , , and .
It is clear that gives , gives , and gives . We claim that all primes give the remainder as well, i.e. that is divisible by for these .
We factor:
Since , is odd and so and are both even. This gives two factors of in . Moreover, one of the three consecutive integers , , is divisible by , and since , it is not . So either or has a factor of , and so does . Thus is divisible by .
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.