Solution 1
The formula for the sum of cubes, also known as Nicomachus's Theorem, is as follows:
13+23+33+⋯+k3=(1+2+3+⋯+k)2=(2k(k+1))2
for any positive integer k.
So let's apply this to this problem.
Let m=n+5. Then we have
13+23+33+⋯+(m−5)3(2(m−5)(m−4))2(2m(m−9)+20)2(m(m−9)+20)2(20)2332≡17modm≡17modm≡17modm≡4⋅17modm≡68modm≡0modm
So, m∈{83,166,332}. Testing the cases, only 332 fails. This leaves 78+161=239.
LATEX and formatting adjustments and intermediate steps for clarification by Technodoggo.
Solution 2 (Official MAA 1)
The sum of the cubes from 1 to n is
13+23+⋯+n3=4n2(n+1)2.
For this to be equal to (n+5)q+17 for some integer q, it must be that
n2(n+1)2=4(n+5)q+4⋅17,
so
n2(n+1)2≡4⋅17=68(modn+5).
But n2(n+1)2≡(−5)2(−4)2=400(modn+5). Thus n2(n+1)2 is congruent to both 68 and 400, which implies that n+5 divides 400−68=332=22⋅83. Because n+5>17, the only choices for n+5 are 83,166, and 332. Checking all three cases verifies that n=78 and n=161 work, but n=327 does not. The requested sum is 78+161=239.
Solution 3 (Official MAA 2)
The sum of the cubes of the integers from 1 through n is
13+23+⋯+n3=4n2(n+1)2,
which, when divided by n+5, has quotient
Q=41n3−43n2+4n−20=4n2(n−3)+4n−20
with remainder 100. If n is not congruent to 1(mod4), then Q is an integer, and
4n2(n+1)2=(n+5)Q+100≡17(modn+5),
so n+5 divides 100−17=83, and n=78. If n≡1(mod4), then Q is half of an integer, and letting n=4k+1 for some integer k gives
4n2(n+1)2=2(2k+3)Q+100≡17(modn+5).
Thus 2k+3 divides 100−17=83. It follows that k=40, and n=161. The requested sum is 161+78=239.
Solution 4
Using the formula for ∑k=1nk3,
13+23+33+...+n3=4n2(n+1)2
Since 13+23+33+...+n3 divided by n+5 has a remainder of 17,
4n2(n+1)2≡17(modn+5)
Using the rules of modular arithmetic,
n2(n+1)2≡68(modn+5)
n2(n+1)2−68≡0(modn+5)
Expanding the left hand side,
n4+2n3+n2−68≡0(modn+5)
This means that n4+2n3+n2−68 is divisible by n+5.
(n+5)∣(n4+2n3+n2−68)
Dividing polynomials,
n+5n4+2n3+n2−68
=n3−3n2+16n−80+(n+5)332
(n+5) ∣ (n4+2n3+n2−68) ⟺ (n+5)332 ∈ Z (n+5)332 ∈ Z ⟺ (n+5)=±1,±2,±4,±83,±166,±332 Note that n ∈ N and n+5>17 (because the remainder when dividing by n+5 is 17, so n+5 must be greater than 17), so all options ≤17 can be eliminated.
(n+5)=83,166,332
n=78,161,327
Checking all 3 cases, n=78 and n=161 work; n=327 fails. Therefore, the answer is 78+161=239. ~ {TSun} ~
Solution 5 (similar ideas to Solution 1, but faster)
As before, we note that (5+a)3+(n−a)3≡(5+a)3−(n+5−(n−a))3≡0(modn+5). Thus, we can pair up the terms from 53 to n3 and cancel them. We have to deal with two cases:
If n is even, then 53+63+⋯+n3≡0(modn+5), as there are an even number of terms and they pair and cancel. We thus get 12+23+33+43=100≡17(modn+5), or (n+5)∣83, which yields n=78.
If n is odd, then 13+23+⋯+n3≡13+23+33+43+(2n+5)3≡17(modn+5). Letting k=2n+5 yields k2+83≡0(mod2k). However, this means that 83 is divisible by k, so k=1,83. Plugging this back into n yields n=2(83)−5=161 in the latter case.
Thus, the sum of all possible n is just 78+161=239.
- ccx09
Video Solution by OmegaLearn
There was a link to alcumus instead of a link to a video solution by OmegaLearn here. I tried to search up his video but I couldn't find it. Please find it and insert it here.
~ pi_is_3.14
Video solution
https://www.youtube.com/watch?v=87Mp0cdUtCU ~ North America Math Contest Go Go Go
Video Solution
https://youtu.be/bz5N-jI2e0U?t=201