Happy new year!

Happy new year

2008 is just around the corner so the next question is just natural: In how many ways can 2008 be written as the sum of consecutive positive integers?

5 Responses to “Happy new year!”

  1. Tomorrowist Says:

    Given that the sum of the first 63 integers=1+2+3+4+ … +61+62+63 = 2016, we only need to check for sums of up 62 consecutive positive integers.

    We could say that the sum of one consecutive integer, 2008, works; but we won’t.

    The sum of n consecutive integers does have certain properties.
    - if n is odd, the sum of n consecutive integers is divisible by n. Suppose n =2m+1; the n consecutive integers with an average value of k are k-m, k-m+1, … , k+m; the sum is k*n.
    - if n is even, the sum of n consecutive integers is not divisible by n. Instead, the remainder is n/2. Suppose the smallest of the consecutive integers is k; the sum of the integers is n*k +1+2+3+…+(n-1)+n=n*k+(n*n+n*n/2). Divide the sum by n, you have a remainder of n/2.

    2008 factored is 8*251. 251 is prime.
    - 2008 is not the sum of an odd number of consecutive positive integers. It is the sum of -117-116 … +7+8+9 … +132+133.
    - 2008 is the sum of 16 consecutive integers; 117+118+…+133+134. It is also the sum of 4016 integers; -2007-2006 … +2007+2008.

    2008 is the sum of exactly three sets of consecutive integers; of lengths 251, 16, and 4016.

  2. Nick Says:

    Hi Tomorrowist,

    It looks like you were using negative integers as well as positive. The problem asked for consecutive positive integers.

    The sixteen positive integers are actually from 118 to 133. Using the range 117 to 134 gives a sum of 2259 and is an eighteen integer set. I subtracted 2008 and got 251 which is the sum of 117 and 134.

  3. Yaratik Says:

    The answer is zero.

    If we think about N positive consecutive integers, the sum is N(n+(N+1)/2).
    2008 is a factor of 8 and 251. N needs to be odd to obtain an even number from such a sum.
    For 251, n becomes negative hence does not work. Rest of the multipliers are even and does not work either. So the answer is zero.

  4. Yaratik Says:

    Correction: Someone pointed out that my solution above has a serious mistake. And the same person wrote a matlab code to find the answer. The answer is 1.
    Sum of numbers from 118 to 133 results in 2008. This actually is the sum of 8×2 consecutive numbers that are around 251/2 (8×251=2008).

  5. rohitj Says:

    so, if sequence starts from n, and total no of consecutive numbers are N then :
    if n is even, N has to be even. If n is odd, N has to be odd. (otherwise there is be odd number of odds).
    case 1: n is even.
    then 2008 = n*2m+m(2m+1) (N=2m)
    now, 2008 is divisible by 8, so m*(2m+1) has to be divisible by 8, so m = 8k.
    now, 2008 = m*(2n + 2m+1)
    so, 251 = k * (2n + 2m +1)
    251 is prime, so k = 1.
    hence N = 16. and now n can be calculated.

Leave a Reply