AMC 10 Step by Step

Topics / Number Theory

Modular Arithmetic

Remainders, congruences, last digits, cyclicity, Chinese-remainder style reasoning

38
primary-topic problems (2.9% of all)
33
more as a secondary topic
Where it appears
9
P1-10
9
P11-15
9
P16-20
11
P21-25

What you need to know

  • ab(modm)a \equiv b \pmod m means m(ab)m \mid (a - b). Congruences can be added, subtracted, and multiplied; you may divide by cc only when gcd(c,m)=1\gcd(c, m) = 1.
  • Powers cycle: the units digits of ana^n repeat with period dividing 44; in general anmodma^n \bmod m is eventually periodic, so reduce the exponent modulo the period.
  • Fermat's little theorem: if pp is prime and pap \nmid a, then ap11(modp)a^{p-1} \equiv 1 \pmod p.
  • Squares are 0,1(mod3)\equiv 0, 1 \pmod 3 and (mod4)\pmod 4; every square is 0,1,4(mod8)\equiv 0, 1, 4 \pmod 8, and every odd square is 1(mod8)\equiv 1 \pmod 8.
  • Chinese Remainder Theorem: if gcd(m,n)=1\gcd(m, n) = 1, a residue mod mm and a residue mod nn determine a unique residue mod mnmn.
  • n(digit sum)(mod9)n \equiv (\text{digit sum}) \pmod 9; n(alternating digit sum)(mod11)n \equiv (\text{alternating digit sum}) \pmod{11}; nmod100n \bmod 100 is the last two digits.

How AMC 10 tests it

  • "What is the units digit (or remainder mod 77) of 32026+3^{2026} + \ldots?" Find the cycle, reduce the exponent (problems 8–15).
  • Day-of-week or clock problems: count days, reduce mod 77 or 1212, watch leap years.
  • "Find the smallest nn with n2(mod3)n \equiv 2 \pmod 3, n3(mod5)n \equiv 3 \pmod 5, n1(mod7)n \equiv 1 \pmod 7": CRT by listing or by stepping through multiples (problems 12–20).
  • Impossibility proofs: show an equation has no solutions by reducing mod 33, 44, 88, or 99.
  • Disguised divisibility, such as "the average was an integer after each entry" meaning partial sums are divisible by their length.

Standard approaches

  1. Reduce the base first, then find the period of the powers and reduce the exponent modulo that period (never modulo mm).
  2. For sums of factorials or products, note that all terms beyond a point are 0\equiv 0; only the first few matter.
  3. For simultaneous congruences, satisfy the largest modulus, then step by it until the next condition holds.
  4. For "no integer solutions," pick a modulus where squares or cubes take few values.
  5. Use negative residues (1-1 instead of m1m - 1) to make powers trivial: 101(mod11)10 \equiv -1 \pmod{11}.

Worked example

What is the remainder when 32026+20263^{2026} + 2026 is divided by 77?

(A) 00 (B) 11 (C) 33 (D) 44 (E) 66

Powers of 33 modulo 77: 3,2,6,4,5,13, 2, 6, 4, 5, 1, then repeat with period 66. Since 2026=6337+42026 = 6 \cdot 337 + 4, we have 32026344(mod7)3^{2026} \equiv 3^4 \equiv 4 \pmod 7. Next, 2026=7289+32026 = 7 \cdot 289 + 3, so 20263(mod7)2026 \equiv 3 \pmod 7. Adding, 32026+20264+3=70(mod7)3^{2026} + 2026 \equiv 4 + 3 = 7 \equiv 0 \pmod 7. The answer is (A) 0\boxed{\textbf{(A)}\ 0}.

Pitfalls

  • Reducing the exponent modulo mm instead of modulo the period of the cycle.
  • Treating remainder 00 as "cycle position 00": 320283^{2028} corresponds to position 66, i.e., 3613^6 \equiv 1, not 303^0.
  • Dividing both sides of a congruence by a number sharing a factor with the modulus.
  • Off-by-one errors in calendar problems (counting the starting day, February in leap years).

Traps that recur

  • Assuming the bits repeat 111 or 011 from the first few (x₀ = x₁ = x₂ = 1) without computing far enough to see the period-3 pattern 0,1,1. (2022 AMC 10B #25)
  • Reducing 90! mod 100 directly (it is 0) or forgetting that removing 21 factors of 5 also requires removing exactly 21 factors of 2. (2010 AMC 10A #24)
  • Assuming powers spread out over many residues (answering 25 or 125) instead of testing whether 100 is a multiple of the order of every unit mod 125. (2024 AMC 10B #18)
  • Testing only whether each fraction is an integer separately; for odd m none of them is, yet the fractional parts 1/2 + 1/4 + 1/8 + 1/8 add up to exactly 1. (2024 AMC 10B #24)

Problems, easiest first

2023 AMC 10B · #8Modular Arithmetic

What is the units digit of 20222023+202320222022^{2023} + 2023^{2022} ?

2012 AMC 10B · #4Modular Arithmetic

When Ringo places his marbles into bags with 6 marbles per bag, he has 4 marbles left over. When Paul does the same with his marbles, he has 3 marbles left over. Ringo and Paul pool their marbles and place them into as many bags as possible, with 6 marbles per bag. How many marbles will be left over?

2025 AMC 10B · #2Modular Arithmetic

Jerry wrote down the ones digit of each of the first 20252025 positive squares: 1,4,9,6,5,6,1,4,9,6,5,6,\dots . What is the sum of all the numbers Jerry wrote down?

2024 AMC 10B · #7Modular Arithmetic

What is the remainder when 72024+72025+720267^{2024}+7^{2025}+7^{2026} is divided by 1919 ?

2023 AMC 10B · #6Modular Arithmetic

Let L1=1L_1 = 1 , L2=3L_2 = 3 , and Ln+2=Ln+1+LnL_{n+2} = L_{n+1}+L_n for n1n \geq 1 . How many terms in the sequence L1,L2,L3,,L2023L_1, L_2, L_3, \cdots, L_{2023} are even?

2021 AMC Fall 10A · #12Modular Arithmetic

The base-nine representation of the number NN is 27,006,000,052nine.27{,}006{,}000{,}052_{\text{nine}}. What is the remainder when NN is divided by 5?5?

2017 AMC 10A · #13Modular Arithmetic

Define a sequence recursively by F0=0, F1=1,F_{0}=0,~F_{1}=1, and Fn=F_{n}= the remainder when Fn1+Fn2F_{n-1}+F_{n-2} is divided by 3,3, for all n2.n\geq 2. Thus the sequence starts 0,1,1,2,0,2,0,1,1,2,0,2,\ldots What is F2017+F2018+F2019+F2020+F2021+F2022+F2023+F2024?F_{2017}+F_{2018}+F_{2019}+F_{2020}+F_{2021}+F_{2022}+F_{2023}+F_{2024}?

2016 AMC 10B · #8Modular Arithmetic

What is the tens digit of 201520162017?2015^{2016}-2017?

2015 AMC 10B · #10Modular Arithmetic

What is the sign and units digit of the product of all the odd negative integers strictly greater than 2015-2015 ?

2009 AMC 10B · #13Modular Arithmetic

As shown below, convex pentagon ABCDEABCDE has sides AB=3AB=3 , BC=4BC=4 , CD=6CD=6 , DE=3DE=3 , and EA=7EA=7 . The pentagon is originally positioned in the plane with vertex AA at the origin and vertex BB on the positive xx -axis. The pentagon is then rolled clockwise to the right along the xx -axis. Which side will touch the …

2007 AMC 10B · #9Modular Arithmetic

A cryptographic code is designed as follows. The first time a letter appears in a given message it is replaced by the letter that is 11 place to its right in the alphabet (asumming that the letter AA is one place to the right of the letter ZZ ). The second time this same letter appears in the given message, it is …

2006 AMC 10B · #11Modular Arithmetic

What is the tens digit in the sum 7!+8!+9!+...+2006!7!+8!+9!+...+2006!

2003 AMC 10A · #16Modular Arithmetic

What is the units digit of 13200313^{2003} ?

2000 AMC 10 · #6Modular Arithmetic

The Fibonacci sequence 1,1,2,3,5,8,13,21,1,1,2,3,5,8,13,21,\ldots starts with two 1s, and each term afterwards is the sum of its two predecessors. Which one of the ten digits is the last to appear in the units position of a number in the Fibonacci sequence?

2022 AMC 10B · #17Modular Arithmetic

One of the following numbers is not divisible by any prime number less than 10.10. Which is it?

2020 AMC 10B · #15Modular Arithmetic

Steve wrote the digits 11 , 22 , 33 , 44 , and 55 in order repeatedly from left to right, forming a list of 10,00010,000 digits, beginning 123451234512.123451234512\ldots. He then erased every third digit from his list (that is, the 33 rd, 66 th, 99 th, \ldots digits from the left), then erased every fourth digit from the …

2018 AMC 10B · #16Modular Arithmetic

Let a1,a2,,a2018a_1,a_2,\dots,a_{2018} be a strictly increasing sequence of positive integers such that a1+a2++a2018=20182018.a_1+a_2+\cdots+a_{2018}=2018^{2018}. What is the remainder when a13+a23++a20183a_1^3+a_2^3+\cdots+a_{2018}^3 is divided by 66 ?

2018 AMC 10B · #13Modular Arithmetic

How many of the first 20182018 numbers in the sequence 101,1001,10001,100001,101, 1001, 10001, 100001, \dots are divisible by 101101 ?

2018 AMC 10A · #19Modular Arithmetic

A number mm is randomly selected from the set {11,13,15,17,19}\{11,13,15,17,19\} , and a number nn is randomly selected from {1999,2000,2001,,2018}\{1999,2000,2001,\ldots,2018\} . What is the probability that mnm^n has a units digit of 11 ?

2017 AMC 10B · #14Modular Arithmetic

An integer NN is selected at random in the range 1N20201\leq N \leq 2020 . What is the probability that the remainder when N16N^{16} is divided by 55 is 11 ?

2010 AMC 10B · #18Modular Arithmetic

Positive integers aa , bb , and cc are randomly and independently selected with replacement from the set {1,2,3,,2010}\{1, 2, 3,\dots, 2010\} . What is the probability that abc+ab+aabc + ab + a is divisible by 33 ?

2009 AMC 10B · #21Modular Arithmetic

What is the remainder when 30+31+32++320093^0 + 3^1 + 3^2 + \cdots + 3^{2009} is divided by 8?

2006 AMC 10A · #20Modular Arithmetic

Six distinct positive integers are randomly chosen between 11 and 20062006 , inclusive. What is the probability that some pair of these integers has a difference that is a multiple of 55 ?

2004 AMC 10B · #13Modular Arithmetic

In the United States, coins have the following thicknesses: penny, 1.551.55 mm; nickel, 1.951.95 mm; dime, 1.351.35 mm; quarter, 1.751.75 mm. If a stack of these coins is exactly 1414 mm high, how many coins are in the stack?

2000 AMC 10 · #14Modular Arithmetic

Mrs. Walter gave an exam in a mathematics class of five students. She entered the scores in random order into a spreadsheet, which recalculated the class average after each score was entered. Mrs. Walter noticed that after each score was entered, the average was always an integer. The scores (listed in ascending order) …

2000 AMC 10 · #17Modular Arithmetic

Boris has an incredible coin-changing machine. When he puts in a quarter, it returns five nickels; when he puts in a nickel, it returns five pennies; and when he puts in a penny, it returns five quarters. Boris starts with just one penny. Which of the following amounts could Boris have after using the machine …

2024 AMC 10B · #18Modular Arithmetic

How many different remainders can result when the 100100 th power of an integer is divided by 125125 ?

2024 AMC 10B · #24Modular Arithmetic

Let P(m)=m2+m24+m48+m88P(m)=\frac{m}{2}+\frac{m^2}{4}+\frac{m^4}{8}+\frac{m^8}{8} How many of the values P(2022)P(2022) , P(2023)P(2023) , P(2024)P(2024) , and P(2025)P(2025) are integers?

2022 AMC 10A · #19Modular Arithmetic

Define LnL_n as the least common multiple of all the integers from 11 to nn inclusive. There is a unique integer hh such that 11+12+13++117=hL17\frac{1}{1}+\frac{1}{2}+\frac{1}{3}+\cdots+\frac{1}{17}=\frac{h}{L_{17}} What is the remainder when hh is divided by 1717 ?

2021 AMC Fall 10B · #22Modular Arithmetic

For each integer n2n\geq 2 , let SnS_n be the sum of all products jkjk , where jj and kk are integers and 1j<kn1\leq j<k\leq n . What is the sum of the 10 least values of nn such that SnS_n is divisible by 33 ?

2017 AMC 10B · #23Modular Arithmetic

Let N=1234567891011124344N=123456789101112\dots4344 be the 7979 -digit number that is formed by writing the integers from 11 to 4444 in order, one after the other. What is the remainder when NN is divided by 4545 ?

2017 AMC 10B · #25Modular Arithmetic

Last year Isabella took 77 math tests and received 77 different scores, each an integer between 9191 and 100100 , inclusive. After each test she noticed that the average of her test scores was an integer. Her score on the seventh test was 9595 . What was her score on the sixth test?

2011 AMC 10B · #23Modular Arithmetic

What is the hundreds digit of 201120112011^{2011} ?

2008 AMC 10A · #24Modular Arithmetic

Let k=20082+22008k={2008}^{2}+{2}^{2008} . What is the units digit of k2+2kk^2+2^k ?

2003 AMC 10B · #25Modular Arithmetic

How many distinct four-digit numbers are divisible by 33 and have 2323 as their last two digits?

2003 AMC 10A · #25Modular Arithmetic

Let nn be a 55 -digit number, and let qq and rr be the quotient and the remainder, respectively, when nn is divided by 100100 . For how many values of nn is q+rq+r divisible by 1111 ?

2022 AMC 10B · #25Modular Arithmetic

Let x0,x1,x2,x_0,x_1,x_2,\dotsc be a sequence of numbers, where each xkx_k is either 00 or 11 . For each positive integer nn , define Sn=k=0n1xk2kS_n = \sum_{k=0}^{n-1} x_k 2^k Suppose 7Sn1(mod2n)7S_n \equiv 1 \pmod{2^n} for all n1n \geq 1 . What is the value of the sum x2019+2x2020+4x2021+8x2022?x_{2019} + 2x_{2020} + 4x_{2021} + 8x_{2022}?

2010 AMC 10A · #24Modular Arithmetic

The number obtained from the last two nonzero digits of 90!90! is equal to nn . What is nn ?