4 ms·
The only possible values of a cube mod 9 are 0, 1 and 8. (If you expand (9n+r)^3 you'll see that all the terms divide by 9 except r^3. So the value of a cube mo
by OscarCunningham 8y ago
The only possible values of a cube mod 9 are 0, 1 and 8. (If you expand (9n+r)^3 you'll see that all the terms divide by 9 except r^3. So the value of a cube mod 9 depends only on its own mod 9 value. So we only need to check that 0, 1 and 8 are the only values achieved by the first 9 cubes.) If you add three of these values the only possible answers are 0, 1, 2, 3, 6, 7 and 8 mod 9.