2021 AMC 12A Fall Problem 25

Attempt Problem 25 of the 2021 AMC 12A Fall below, then check your answer against the professionally curated solution from LIVE by Po-Shen Loh. You can also try the full timed exam, view all 2021 AMC 12A Fall solutions, or check the answer key.

All problems are used with official legal permission of the Mathematical Association of America (MAA).

25.

Let m≥5m \ge 5 be an odd integer, and let D(m)D(m) denote the number of quadruples (a1,a2,a3,a4)(a_1, a_2, a_3, a_4) of distinct integers with 1≤ai≤m1 \le a_i \le m for all ii such that mm divides a1+a2+a3+a4.a_1 + a_2 + a_3 + a_4. There is a polynomial q(x)=c3x3+c2x2+c1x+c0 q(x) = c_3x^3 + c_2x^2 + c_1x + c_0 such that D(m)=q(m)D(m) = q(m) for all odd integers m≥5.m \ge 5. What is c1?c_1?
−6-6
−1-1
44
66
1111
Answer: E
Concepts:modular arithmeticroots of unitypolynomial
Small hint:
First count all ordered residue quadruples summing to 0(modm),0\pmod m, then use inclusion-exclusion on equal coordinates
Big hint:
Group collision patterns as one pair, two pairs, a triple, or all four equal; odd mm makes multiplication by 22 and 44 invertible
Solution:
Regard 1,2,…,m1,2,\ldots,m as all residues modulo m.m. Without the distinctness condition, the first three entries are arbitrary and the fourth is determined, giving m3m^3 ordered quadruples.
Inclusion-exclusion over equal-coordinate partitions gives the remaining terms. There are 66 choices of one equal pair, each leaving m2m^2 solutions, for −6m2.-6m^2. The 33 two-pair partitions contribute +3m.+3m. The 44 triple-and-single partitions have inclusion-exclusion coefficient 22 and contribute +8m.+8m. Finally, the all-equal partition has coefficient −6-6 and one solution. (Here odd mm makes 22 and 44 invertible modulo m.m.) Therefore D(m)=m3−6m2+11m−6=(m−1)(m−2)⋅(m−3). \begin{aligned} D(m)&=m^3-6m^2 \\ &\quad {}+11m-6 \\ &=(m-1)(m-2) \\ &\quad {}\cdot(m-3). \end{aligned} Hence c1=11.c_1=11.
Thus, the correct answer is E.
LIVE by Po-Shen Loh
Programs

LIVE Classes

Self-Paced Classes

Stars

Scholarship

About Us

Who Is Po-Shen Loh?

Email Contact

Newsletter

Jobs

Become a Star

For a more Thought Full world.

© 2026 Expii, Inc.