Problem

How many positive integers $n$ with $n \leq 100$ can be expressed as the sum of four or more consecutive positive integers?

Solution (by Jaron Bailey, from Australia)

Let $n$ be the number of consecutive numbers and $s$ the starting value of the consecutive numbers. Then we can express the sum of $s, \dots, s+n-1$ as:

$$ S_{s,n} = \frac{2s + (n - 1)}{2}n. $$

We want to find the value of $s$ for each $n$ such that $S_{s,n}$ equals $100$. This value of $s$ is given by the equation:

$$ s_{max} = \frac{200 - n^2 + n}{2n}. $$

We can see here that the maximum value of $n$ will be $14$, otherwise $s_{max}$ goes negative. We also need to truncate the results because not all sequences will exactly add to $100$; noting that with $n=14$ the truncated answer equals zero. Now consider the following table, which we can calculate by hand:

Untitled

Now that we know the $S_{1,n}$ for each $n$, we have $S_{s,n} = S_{1,n} + (s-1)n$. Calculating these out and removing the duplicates, we find there are $63$ numbers between $1$ and $100$ which can be expressed as the sum of four or more consecutive positive integers.

Thank you!

Special thanks to Erik Novak, Assaf Peretz, and Jaron Bailey for submitting a solution for this challenge problem.