Skip to main content

2025 AIME I Problem 15

Problem 15 of 15HarderNumber TheoryCombinatorics

Let NN denote the number of ordered triples of positive integers (a,b,c)(a, b, c) such that a,a, b,b, c≤36c \le 3^6 and a3+b3+c3a^3 + b^3 + c^3 is a multiple of 37.3^7. Find the remainder when NN is divided by 1000.1000.

Your answer

Integer from 0 to 999
Show solution

Solution

Since (a+36t)3≡a3(mod37),(a + 3^6 t)^3 \equiv a^3 \pmod{3^7}, the cube of aa modulo 373^7 depends only on a mod 36,a \bmod 3^6, and each residue occurs exactly once in 1≤a≤36.1 \le a \le 3^6. Moreover, the only cube roots of 11 modulo 373^7 are 1+36t,1 + 3^6 t, which all agree modulo 36;3^6; hence cubing is a bijection from the 486486 units modulo 363^6 onto the set of unit cubes modulo 37,3^7, which is exactly the set of units ≡±1(mod9).\equiv \pm 1 \pmod 9. If all three of a,a, b,b, and cc are prime to 33 (or exactly one is), then modulo 99 the sum of cubes is ±1±1±1\pm 1 \pm 1 \pm 1 or ±1,\pm 1, never 0:0: no solutions. Exactly one multiple of 3,3, say c=3z:c = 3z: for each of the 486486 units aa and 243243 choices of c,c, the requirement b3≡−a3−27z3(mod37)b^3 \equiv -a^3 - 27z^3 \pmod{3^7} has a right side that is a unit ≡±1(mod9),\equiv \pm 1 \pmod 9, hence has exactly one solution bb modulo 36.3^6. With 33 choices for which variable is the multiple of 3,3, this case gives 3⋅486⋅243=3542943 \cdot 486 \cdot 243 = 354294 triples. All three multiples of 3:3: writing a=3xa = 3x etc. with x,x, y,y, and zz ranging modulo 35,3^5, the condition becomes x3+y3+z3≡0(mod34),x^3 + y^3 + z^3 \equiv 0 \pmod{3^4}, which depends only on the residues modulo 33,3^3, so the count is 939^3 times the count modulo 27.27. Repeating the same analysis one level down: the two-unit case gives 3⋅18⋅9=486,3 \cdot 18 \cdot 9 = 486, and the all-divisible case reduces to u+v+w≡0(mod3)u + v + w \equiv 0 \pmod 3 with u,u, v,v, and ww modulo 9,9, giving 243;243; that is 486+243=729486 + 243 = 729 triples modulo 27,27, hence 729⋅729=531441729 \cdot 729 = 531441 here. In total N=354294+531441=885735,N = 354294 + 531441 = 885735, whose remainder modulo 10001000 is 735.735.
AoPS wiki

Tagged: modular arithmetic · perfect power · recursive counting

More practice