Reducing a large power modulo five
Proof Techniques & Number Theory

Answer & solution
Official answer: 2
Method: find the repeating cycle of powers modulo 5, rather than form the large integer.
1. Compute successive residues: 3¹≡3, 3²=9≡4, 3³≡4×3=12≡2, and 3⁴≡2×3=6≡1 (mod 5).
2. Once the residue is 1, the next powers repeat this four-step pattern. Write 51=4×12+3.
3. Therefore 351=(3⁴)12·3³≡112·2≡2 (mod 5).
4. The residue 2 already lies in the standard range 0 through 4, so no further reduction is needed.
Result: 2.
