← All lessons

Modular Arithmetic (AIME / USAJMO / AMO)

Proof-style AIME / USAJMO / AMO statements — develop a full argument; type only the final answer.

Proof track: treat each problem as a full olympiad writeup on paper. Here you only enter the final answer (integer or short expression).

Modular Arithmetic: core idea

Orders and Fermat.

Example problem: hint and answer

**(Proof track.)** Prove Fermat’s little theorem for prime pp and then compute 2100 mod 1012^{100}\bmod 101. Enter the remainder.

Hint: 2100≡1(mod101)2^{100}\equiv1\pmod{101} since 101∤2101\nmid2. Answer: 1.

Practice (9 problems — type your answers)

No proof submission required — answers only.

  • 1. **(Proof track.)** Prove the Chinese Remainder Theorem for pairwise coprime moduli, then find the unique n∈(0,5⋅7⋅8]n\in(0,5\cdot7\cdot8] with n≡1(mod5)n\equiv1\pmod5, n≡2(mod7)n\equiv2\pmod7, n≡3(mod8)n\equiv3\pmod8. Enter nn.

  • 2. **(Proof track.)** Prove that the order of aa modulo nn (when gcd⁡(a,n)=1\gcd(a,n)=1) divides φ(n)\varphi(n). Enter the order of 33 modulo 1414.

  • 3. **(Proof track.)** Using Wilson’s theorem, prove (p−1)!≡−1(modp)(p-1)!\equiv-1\pmod p for prime pp. Enter 12! mod 1312!\bmod 13.

  • 4. **(Proof track.)** Prove a formula for the number of solutions to x2≡1(modpk)x^2\equiv1\pmod{p^k} for odd prime pp. For p=5p=5, k=2k=2 (mod 2525), how many solutions in 0≤x<250\le x<25?

  • 5. **(Proof track.)** Prove Euler’s criterion or use successive squaring: enter 516 mod 175^{16}\bmod 17.

  • 6. **(Proof track.)** Show that if pp is an odd prime, then ∑k=1p−1kp−2≡−1(modp)\sum_{k=1}^{p-1}k^{p-2}\equiv-1\pmod p or compute the concrete case: enter ∑k=16k5 mod 7\sum_{k=1}^{6}k^{5}\bmod 7.

  • 7. **(Proof track.)** Prove the lifting-the-exponent lemma (LTE) for v2(xn±yn)v_2(x^n\pm y^n) in the standard case, then enter v2(38−1)v_2(3^{8}-1).

  • 8. **(Proof track.)** Prove that there are infinitely many primes p≡3(mod4)p\equiv3\pmod4 (Euclid-style). As a computational check related to the construction, enter the smallest prime p>20p>20 with p≡3(mod4)p\equiv3\pmod4.

  • 9. **(Proof track.)** Prove φ\varphi is multiplicative and compute φ(504)\varphi(504). Enter the value.

Modular Arithmetic Practice Problems — AIME / USAJMO / AMO