Find all series of consecutive positive integers whose sum is exactly 10,000.
__________________________________
What if we don't require the consecutive integers to (all) be positive?
In general, for there to be a series of consecutive integers with n terms that adds up to some number x, two things are true:
For odd n, x must be a multiple of n. Thus, the terms in the sequence are centered around x/n, with (n - 1)/2 terms on either side of x/n.
For even n, (x - n/2) must be a multiple of n. For this to be true, x must be a multiple of n/2, but not a direct multiple of n. In that case, the terms in the sequence are again centered around x/n (which ends in .5), with n/2 terms above and n/2 terms below.
For the specific case of 10000, we could just start at one and test each number to see if it works, but we can make things a little easier.
First of all, the prime factorization of 10000 is just 24 × 54, so the only odd factors will be powers of 5 (and, of course, 1).
For n = 1, you have of course a series of one term in 10000 itself.
10000 = 10000
For n = 5, there is a series of 5 terms centered around 10000/5 = 2000:
1998 + 1999 + 2000 + 2001 + 2002 = 10000
For n = 25, you have a series of 25 terms centered around 10000/25 = 400:
388 + 389 + 390 + 391 + ... + 409 + 410 + 411 + 412 = 10000
For n = 125, there is a series of 125 terms centered around 10000/125 = 80:
18 + 19 + 20 + 21 + ... + 139 + 140 + 141 + 142 = 10000
For n = 625, there is a series of 625 terms centered around 10000/625 = 16. Note that this series only counts when we take away the restriction that all terms of the series must be positive.
-296 + -295 + -294 + -293 + ... + 325 + 326 + 327 + 328 = 1000
For even n, we need to find values for which n/2 is a factor of 10000, but n itself is not. Based on the prime factorization of 10000 (= 24 × 54), our values need to include all four factors of two, plus an extra 2 to make n itself indivisible into 10000; and any number of factors of five (between zero and four). So, we have five possibilities: 32, 160, 800, 4000, and 20000.
For n = 32, there is a series of 32 terms centered around 10000/32 = 312.5:
297 + 298 + 299 + 300 + ... + 325 + 326 + 327 + 328 = 10000
For n = 160, there is a series of 160 terms centered around 10000/160 = 62.5:
-17 + -16 + -15 + -14 + ... + 139 + 140 + 141 + 142 = 10000
For n = 800, there is a series of 800 terms centered around 10000/800 = 12.5:
-387 + -386 + -385 + -384 + ... + 409 + 410 + 411 + 412 = 10000
For n = 4000, there is a series of 4000 terms centered around 10000/4000 = 2.5:
-1997 + -1996 + -1995 + -1994 + ... + 1999 + 2000 + 2001 + 2002 = 10000
Finally, for n = 20000, there is a series of 20000 terms centered around 10000/20000 = .5:
-9999 + -9998 + -9997 + -9996 + ... + 9997 + 9998 + 9999 +10000 = 10000
So, here is the complete list, with those series containing only positive integers listed first:
10000 = 10000
1998 + 1999 + ... + 2001 + 2002 = 10000
388 + 389 + ... + 411 + 412 = 10000
297 + 298 + ... 327 + 328 = 10000
18 + 19 + ... + 141 + 142 = 10000
-9999 + -9998 + ... + 9999 +10000 = 10000
-1997 + -1996 + ... + 2001 + 2002 = 10000
-387 + -386 + ... + 411 + 412 = 10000
-296 + -295 + ... + 327 + 328 = 1000
-17 + -16 + ... + 141 + 142 = 10000
Looking at these series, a correlation between the positive and negative series should be obvious. Each of the negative series has a number of terms that simply add up to zero and cancel each other out, leaving us with one of the positive series that we have already found.
|
Posted by DJ
on 2004-07-21 13:25:35 |