Maths Olympiad Prep

Library / /11 of 20

Number theory Difficulty 4.9 AIME Prove it United States

Problem:
Let pp be a prime number. Find all possible values of the remainder when p21p^{2}-1 is divided by 1212.

Solution

Solution:
The answers are 33, 88, and 00.

It is clear that p=2p=2 gives 33, p=3p=3 gives 88, and p=5p=5 gives 00. We claim that all primes p5p \geq 5 give the remainder 00 as well, i.e. that p21p^{2}-1 is divisible by 1212 for these pp.

We factor:
p21=(p+1)(p1) p^{2}-1=(p+1)(p-1)
Since p2p \neq 2, pp is odd and so p+1p+1 and p1p-1 are both even. This gives two factors of 22 in p21p^{2}-1. Moreover, one of the three consecutive integers p1p-1, pp, p+1p+1 is divisible by 33, and since p3p \neq 3, it is not pp. So either p1p-1 or p+1p+1 has a factor of 33, and so does p21p^{2}-1. Thus p21p^{2}-1 is divisible by 223=122 \cdot 2 \cdot 3=12.

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: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.