Here’s a puzzle I came up with this morning (though I’m sure others had thought of it before).

We know that the sum of integers from 1 to n — let’s call it S_{1}(n) — is n × (n+1) / 2.

We know that the sum of the squares of integers from 1 to n — let’s call it S_{2}(n) — is n × (n+1) × (2n+1) / 6.

We know that the sum of the cubes of integers from 1 to n — let’s call it S_{3}(n) — is the square of S_{1}(n).

Of course the sum of the cubes (S_{3}) is always divisible by the sum of the integers themselves (S_{1}).

The sum of the squares (S_{2}) is sometimes divisible by the sum of the integers (S_{1}). For instance, consider n=4: 1+4+9+16 = 30, and 1+2+3+4 = 10.

When is the sum of the cubes (S_{3}) ever divisible by the sum of the squares (S_{2}), for n > 1?