It’s obvious when you think about: an even number can never be the sum of two consecutive integers. Conversely, an odd number (except 1) is always the sum of two consecutive integers: 3 = 1 + 2; 5 = 2 + 3; 7 = 3 + 4; 9 = 4 + 5; and so on. The sum of three consecutive integers can be either odd or even: 6 = 1 + 2 + 3; 9 = 2 + 3 + 4. The sum of four consecutive integers must always be even: 1 + 2 + 3 + 4 = 10; 2 + 3 + 4 + 5 = 14. And so on.

But notice that 9 is the sum of consecutive integers in two different ways: 9 = 4 + 5 = 2 + 3 + 4. Having spotted that, I decided to look for numbers that were the sums of consecutive integers in the most different ways. These are the first few:

3 = 1 + 2 (number of sums = 1)

9 = 2 + 3 + 4 = 4 + 5 (s = 2)

15 = 1 + 2 + 3 + 4 + 5 = 4 + 5 + 6 = 8 + 7 = (s = 3)

45 (s = 5)

105 (s = 7)

225 (s = 8)

315 (s = 11)

945 (s = 15)

1575 (s = 17)

2835 (s = 19)

3465 (s = 23)

10395 (s = 31)

It was interesting that the number of different consecutive-integer sums for *n* was most often a prime number. Next I looked for the sequence at the *Online Encyclopedia of Integer Sequences* and discovered something that I hadn’t suspected:

A053624 Highly composite odd numbers: where d(n) increases to a record.

1, 3, 9, 15, 45, 105, 225, 315, 945, 1575, 2835, 3465, 10395, 17325, 31185, 45045, 121275, 135135, 225225, 405405, 675675, 1576575, 2027025, 2297295, 3828825, 6891885, 11486475, 26801775, 34459425, 43648605, 72747675, 130945815 — A053624 at OEIS

The notes add that the sequence is “Also least number k such that the number of partitions of k into consecutive integers is a record. For example, 45 = 22+23 = 14+15+16 = 7+8+9+10+11 = 5+6+7+8+9+10 = 1+2+3+4+5+6+7+8+9, six such partitions, but all smaller terms have fewer such partitions (15 has four).” When you don’t count the number *n* itself as a partition of *n*, you get 3 partitions for 15, i.e. consecutive integers sum to 15 in 3 different ways, so *s* = 3. I looked at more values for *s* and found that the stream of primes continued to flow:

3 → s = 1

9 = 3^2 → s = 2 (prime)

15 = 3 * 5 → s = 3 (prime)

45 = 3^2 * 5 → s = 5 (prime)

105 = 3 * 5 * 7 → s = 7 (prime)

225 = 3^2 * 5^2 → s = 8 = 2^3

315 = 3^2 * 5 * 7 → s = 11 (prime)

945 = 3^3 * 5 * 7 → s = 15 = 3 * 5

1575 = 3^2 * 5^2 * 7 → s = 17 (prime)

2835 = 3^4 * 5 * 7 → s = 19 (prime)

3465 = 3^2 * 5 * 7 * 11 → s = 23 (prime)

10395 = 3^3 * 5 * 7 * 11 → s = 31 (prime)

17325 = 3^2 * 5^2 * 7 * 11 → s = 35 = 5 * 7

31185 = 3^4 * 5 * 7 * 11 → s = 39 = 3 * 13

45045 = 3^2 * 5 * 7 * 11 * 13 → s = 47 (prime)

121275 = 3^2 * 5^2 * 7^2 * 11 → s = 53 (prime)

135135 = 3^3 * 5 * 7 * 11 * 13 → s = 63 = 3^2 * 7

225225 = 3^2 * 5^2 * 7 * 11 * 13 → s = 71 (prime)

405405 = 3^4 * 5 * 7 * 11 * 13 → s = 79 (prime)

675675 = 3^3 * 5^2 * 7 * 11 * 13 → s = 95 = 5 * 19

1576575 = 3^2 * 5^2 * 7^2 * 11 * 13 → s = 107 (prime)

2027025 = 3^4 * 5^2 * 7 * 11 * 13 → s = 119 = 7 * 17

2297295 = 3^3 * 5 * 7 * 11 * 13 * 17 → s = 127 (prime)

3828825 = 3^2 * 5^2 * 7 * 11 * 13 * 17 → s = 143 = 11 * 13

6891885 = 3^4 * 5 * 7 * 11 * 13 * 17 → s = 159 = 3 * 53

11486475 = 3^3 * 5^2 * 7 * 11 * 13 * 17 → s = 191 (prime)

26801775 = 3^2 * 5^2 * 7^2 * 11 * 13 * 17 → s = 215 = 5 * 43

34459425 = 3^4 * 5^2 * 7 * 11 * 13 * 17 → s = 239 (prime)

43648605 = 3^3 * 5 * 7 * 11 * 13 * 17 * 19 → s = 255 = 3 * 5 * 17

72747675 = 3^2 * 5^2 * 7 * 11 * 13 * 17 * 19 → s = 287 = 7 * 41

130945815 = 3^4 * 5 * 7 * 11 * 13 * 17 * 19 → s = 319 = 11 * 29

I can’t spot any way of predicting when *n* will yield a primal *s*, but I like the way that a simple question took an unexpected turn. When a number sets a record for the number of different ways it can be the sum of consecutive integers, that number will also be a highly composite odd number.