Skip to main content

2026 AIME II Problem 15

Problem 15 of 15HarderNumber TheoryCombinatoricsProblem-Solving Techniques

Find the number of ordered 77-tuples (a1,a2,a3,…,a7)(a_1, a_2, a_3, \ldots, a_7) having the following properties: • ak∈{1,2,3}a_k \in \{1, 2, 3\} for all k.k. • a1+a2+a3+a4a_1 + a_2 + a_3 + a_4 +a5+a6+a7+ a_5 + a_6 + a_7 is a multiple of 3.3. • a1a2a4a_1a_2a_4 +a2a3a5+ a_2a_3a_5 +a3a4a6+ a_3a_4a_6 +a4a5a7+ a_4a_5a_7 +a5a6a1+ a_5a_6a_1 +a6a7a2+ a_6a_7a_2 +a7a1a3+ a_7a_1a_3 is a multiple of 3.3.

Your answer

Integer from 0 to 999
Show solution

Solution

Work modulo 3:3: entries 33 are 00 and entries 1,21, 2 are ±1.\pm 1. Because the differences of {0,1,3}\{0, 1, 3\} hit every nonzero residue mod 77 exactly once, the seven triples {i,i+1,i+3}\{i, i+1, i+3\} are the lines of a Fano plane on the positions: every pair of positions lies on exactly one line, and any two lines meet in exactly one point. Let ZZ be the set of positions holding a 33 and k=∣Z∣.k = |Z|. A product term survives exactly when its line avoids Z.Z. If tLt_L is the number of entries equal to 22 on that line, its contribution is (−1)tL,(-1)^{t_L}, and the linear condition constrains the 7−k7 - k values ±1\pm 1 to sum to 00 mod 3.3. Casework on k.k. k=7:k = 7: the all-33s tuple works: 1.1. k=6:k = 6: a single ±1\pm 1 can’t sum to 0:0: none. k=5:k = 5: no line survives; the two nonzero entries must be a 11 and a 2:2: (72)⋅2=42.\binom{7}{2} \cdot 2 = 42. k=4:k = 4: three ±1\pm 1s sum to 00 only if all equal, and the three nonzero positions must not form a line, else its product is ±1:\pm 1: (35−7)⋅2=56.(35 - 7) \cdot 2 = 56. k=3:k = 3: four ±1\pm 1s must split two and two; exactly one line avoids a non-line ZZ (spoiling the sum), while a line ZZ is avoided by no line: 7⋅(42)=42.7 \cdot \binom{4}{2} = 42. k=2:k = 2: five ±1\pm 1s must go four and one; exactly two lines avoid Z,Z, meeting at a point pp and covering the five positions, and their products cancel exactly when the lone minority value avoids p:p: (72)⋅2⋅4=168.\binom{7}{2} \cdot 2 \cdot 4 = 168. k=1:k = 1: six ±1\pm 1s sum to 00 if all equal or three of each; the four lines avoiding ZZ pairwise meet in the six nonzero positions, and since the product of all four line-products is +1,+1, we need exactly two negative lines. All-equal gives 00 or 44 negative lines; for three 22’s, viewing positions as edges of K4K_4 on the four lines, a line is negative exactly when it has odd degree in the chosen 33-edge set, and exactly the 1212 three-edge paths (of the (63)=20\binom{6}{3} = 20 subsets) give two odd degrees: 7⋅12=84.7 \cdot 12 = 84. k=0:k = 0: seven ±1\pm 1s need two or five 22’s, which make 44 or 33 lines negative respectively, but 7−2t≡0(mod3)7 - 2t \equiv 0 \pmod 3 needs t≡2(mod3):t \equiv 2 \pmod 3: none. The total is 1+42+561 + 42 + 56 +42+168+84=393.+ 42 + 168 + 84 = 393.
AoPS wiki

Tagged: modular arithmetic · graph theory · casework

More practice