Skip to main content

2020 AIME II Problem 10

Problem 10 of 15IntermediateAlgebraNumber Theory

Find the sum of all positive integers nn such that when 13+23+33+⋯+n31^3 + 2^3 + 3^3 + \cdots + n^3 is divided by n+5,n + 5, the remainder is 17.17.

Your answer

Integer from 0 to 999
Show solution

Solution

Let K=n(n+1)2,K = \frac{n(n+1)}{2}, so the sum of cubes is K2.K^2. Modulo n+5n + 5 we have n≡−5,n \equiv -5, hence 2K=n(n+1)2K = n(n+1) ≡(−5)(−4)=20\equiv (-5)(-4) = 20 and 4K2≡400.4K^2 \equiv 400. If K2≡17(modn+5),K^2 \equiv 17 \pmod{n+5}, then n+5n + 5 divides 400−4⋅17=332=22⋅83.400 - 4 \cdot 17 = 332 = 2^2 \cdot 83. Since a remainder of 1717 also forces n+5>17,n + 5 \gt 17, the candidates are n+5∈{83,166,332},n + 5 \in \{83, 166, 332\}, i.e. n∈{78,161,327}.n \in \{78, 161, 327\}. Because we multiplied by 4,4, each candidate must be checked. For n=78:n = 78: K=3081≡10(mod83),K = 3081 \equiv 10 \pmod{83}, and 102=100≡17(mod83).10^2 = 100 \equiv 17 \pmod{83}. For n=161:n = 161: K=13041≡93(mod166),K = 13041 \equiv 93 \pmod{166}, and 932=8649=52⋅166+17.93^2 = 8649 = 52 \cdot 166 + 17. For n=327:n = 327: K=53628≡176(mod332),K = 53628 \equiv 176 \pmod{332}, and 1762=30976=93⋅332+100,176^2 = 30976 = 93 \cdot 332 + 100, remainder 100≠17,100 \ne 17, so this one fails. The valid values are n=78n = 78 and n=161,n = 161, with sum 78+161=239.78 + 161 = 239.
AoPS wiki

Tagged: sum of first n cubes · modular arithmetic · divisibility

More practice