Solution: 45.
The example in the puzzle showed that 9 can be written as a
sum of consecutive integers in three different ways. A little investigating
reveals that 10, 11, 12, 13, and 14 can each be written as a sum of consecutive
integers in two different ways, but 15 can be written as a sum of consecutive
integers in four different ways. So this leads us to ask — how are 9 and
15 different from 10, 11, 12, 13, and 14, and how are they different from each
other?
The difference is the number of odd divisors. The number 9
has three odd divisors (1, 3, and 9), the numbers 10, 11, 12, 13, and 14
each have two odd divisors, and 15 has four odd divisors (1, 3, 5,
and 15). In general, the number of possible sums for a given positive
integer n equals the number of odd
divisors of n. The number 45 has six
odd divisors, namely 1, 3, 5, 9, 15, and 45, so it can be represented as
the sum of consecutive positive integers in six different ways. As it turns
out, 45 is the smallest number with six odd divisors. (It is left to you to
prove that there are no smaller numbers with exactly six odd divisors.)
The connection between odd divisors and sums may not be immediately
obvious, but notice that 3 is an odd divisor of 45, and if you divide 45
by 3 to get 15, you’re at the middle of a three-term sequence of consecutive
numbers adding up to 45; that is, 45 ÷ 3 = 15 leads to the sum 14 + 15 + 16.
Similarly, 45 ÷ 1 = 45 leads to a one‑term sum with 45 as the middle number; 45
÷ 5 = 9 leads to a five-term sum with 9 as the middle number, 7 + 8 + 9 + 10 +
11; and, of course,
45 ÷ 9 = 5 leads to a nine-term sum with 5 as the middle number, 1 + 2 + 3 + 4
+ 5 + 6 + 7 + 8 + 9. The other two sums result from two times an odd divisor,
in this case 45 ÷ (1 × 2) = 22.5 leads to the two‑term sum 22 + 23,
and 45 ÷ (3 × 2) = 7.5 leads to the six‑term sum 5 + 6 + 7 + 8 + 9 + 10.