The year as a sum of consecutive days

In how many ways can the number 2008 be written as the sum of consecutive positive integers? What about 2551 (the current Thai year) or 1429 (the current Islamic Year)?
This entry was posted
on Monday, September 29th, 2008 at 12:01 am and is filed under Problem.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
October 1st, 2008 at 1:18 pm
I found only one way to do each of these sums.
16 consecutive positive integers can be summed to 2008.
One pair each of consecutive positive integers can be summed to the odd years.
I wish I could say I found a mathematical way of doing this, but I really just brute force checked all possibilities with a little program I wrote.
October 4th, 2008 at 3:45 am
The sum of an arithmetic progression is the product of the number of terms in it, k, and its median, m. (If k is odd, m is the middle term; if k is even, m is halfway between the two middle terms.)
Thus for the terms to be consecutive integers, either
1) k is odd and m is an integer, or else
2) k is even and m is half an odd integer.
Thus for the sum to be a given number n,
in case 1, k=f, and m=n/f, and
in case 2, m=f/2 and k=2n/f,
where f is an odd factor of n.
For the integers to be positive,
m-(k-1)/2 > 1/2
2m-(k-1) > 1
2m-k > 0
2m > k
f=1 yields only the trivial sequence of 1 term (from case 1).
f=n yields a sequence of 2 terms (from case 2).
If n is prime, then these are the only possibilities.
2008 = 2^3 * 251 so the only suitable f is 251 so k=2n/f=16 and m=251/2 (as found by Ted).
2551 and 1429 are prime. So Ted has found all the possibilities.