Skip to main content

2021 Fall AMC 12A Problem 25

Problem 25 of 25HarderAlgebraNumber Theory

Let m5m \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 1aim1 \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 m5.m \ge 5. What is c1?c_1?

Answer choices

Show solution

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)=m36m2+11m6=(m1)(m2)(m3). \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.

More practice

Concepts: modular arithmetic · roots of unity · polynomial

Problem text and solution from the LIVE past-contest archive. See also the AoPS wiki page for community solutions.