Find the sum of all positive integers $n$ such that when $1^3+2^3+3^3 +\dots+ n^3$ is divided by $n+5$ the remainder is $17.$
Letting $k= n+5$ we get that $1^3+2^3+3^3 +\dots+ (k-5)^3 \equiv 17 \text{ (mod $k$)}$.
Knowing the sum of cubes formula we get that ($\frac{(k-5)(k-4)}{2})^2\equiv 17 \text{ (mod $k$)}$.
From here I'm not sure how I should continue. What would be my options?