Solution to February 2003 Problem

 

Note that 3 = 1+2, 5 = 2+3, 6 = 1+2+3, 7 = 3+4, but neither 4 nor 8 can be written as the sum of two or more CONSECUTIVE positive integers. Your task for February is to show that this pattern continues forever:

  1. Show that no power of 2 can be written as the sum of two or more consecutive positive integers.

  2. Show that any integer that is not a power of 2 can be written as the
    sum of consecutive integers.

 

Solution to MP30

We received solutions from Francesco Barioli (Regina), Pierre Bornsztein (France), Normand LaLiberté (Ontario), Juan Mir Pieras (Spain), Alexander Potapenko (Russia), Jason Stein (Regina), and Philippe Thenoz. Both Bornsztein and Potapenko proved a stronger result, so we will feature a combination of their work. The other solvers used similar arguments that could easily be extended.

In September of 2004 we received an additional solution to a version of this problem that Wai Yan Pong of California State University (Dominguez Hills) posed to his number theory class.

Our argument is based on the formula for the sum of r consecutive integers,


a + (a+1) + (a+2) + ... + (a + r – 1) = .


(It is said that Gauss, when a young child, discovered an easy way to derive this formula; if you've not seen Gauss's trick before, you may wish to check out our Math Central "Quandaries and Queries" page (http://mathcentral.uregina.ca/) and type "Gauss" in the search area.) The formula immediately provides the answer to part (1): One of r and 2a+r–1 must be even and the other odd, while both must be bigger than 1; consequently n must have an odd factor and thus cannot equal a power of 2. The answer to part (2) is almost as easy, but our goal will be to count the number of ways a number n can be written as a sum of consecutive integers.

We say that the positive integer n admits a decomposition of order r, if for some positive integers a and r, n = r(2a + r – 1)/2; that is, if n = a + (a + 1) + (a + 2) + ... + (a + r – 1), the sum of r consecutive integers starting at a. We make two very simple observations:

  1. Since n = n, every positive integer admits a trivial decomposition of order 1.
  2. For any fixed r, the quantity r(2a + r – 1)/2 increases as a increases, so n admits at most one decomposition of order r.

Denote by Do(n) and De(n) the number of decompositions of n having odd order and even order, respectively, and let D(n) = Do(n) + De(n).

Theorem. For n > 0,

  1. Do(n) equals the number of odd divisors t of n for which 0 < t(t+1)/2 ≤ n.
  2. De(n) equals the number of odd divisors t of n for which n < t(t+1)/2.
  3. D(n) equals the number of odd divisors of n.

Proof.

  1. If n admits a decomposition of odd order r, then there exists a unique value of a for which n = r(2a + r – 1)/2, which implies that r is an odd divisor of n. Moreover, since a ≥ 1 we have 2a + r – 1 ≥ r+1, so that r(r+1)/2 ≤ n. Conversely, if r is an odd divisor of n for which r(r+1)/2 ≤ n, we can solve for a to get a = n/r – (r – 1)/2. One checks easily that a is a positive integer that is the initial term in a decomposition of n of order r, which is unique by the second of our initial observations.
  2. If n admits a decomposition of even order r, then there exists a unique a > 0 for which r(2a + r – 1)/2. Set t = (2a + r – 1). Then t is an odd positive integer that divides n. Furthermore, t(t+1) = t(2a+r) > tr = 2n, from which we see that t(t+1)/2 > n. Conversely, if t is an odd divisor of n for which t(t+1)/2 > n, we set r = 2n/t and a = (t + 1 – r)/2, and verify that r is positive and even, a > 0, and that n = r(2a + r – 1)/2; that is, we conclude that n admits a decomposition of order r (which, again, we know to be unique).
  3. The claim follows immediately from the previous parts.

This proves the theorem. Now let's look at an example. n = 90 = 2·32·5 has 6 odd divisors — t = 1, 3, 5, 9, 15, and 45 — so we expect 6 decompositions. We calculate Do(n) = 4 and De(n) = 2.

Case (1) — t(t+1)/2 < 90

t = divisor r = t = order Decompsoition
1 1 90 n = 90
3 3 29 n = 29 + 30 + 31
5 5 16 n = 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13
9 9 6 n = 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14

 

Case (2) — t(t+1)/2 > 90

t = divisor Decompsoition
15 12 2 n = 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13
45 4 21 n = 21 + 22 + 23 + 24

 

Implications of the theorem.

  1. If n = 2k then D(n) = 1 and the only decomposition of n is that of order 1. In particular, we again confirm that powers of 2 cannot be written as a sum of two or more consecutive positive integers.
  2. If n is an odd prime then D(n) = 2. Since n = 2k + 1 = k + (k+1), we conclude that primes have decompositions of order 1 and of order 2 only. Virtually all solvers noted that this decomposition works for all odd numbers, not just the primes.
  3. If n is even and not a power of 2 then n = m·2k with m ≥ 3 and odd, while k ≥ 1. From (3) we have D(n) ≥ 2; moreover, since even numbers cannot admit a decomposition of order 2 (because the sum of a pair of consecutive integers is odd), n admits a decomposition of order at least 3.
  4. If n is an odd composite number, then from (3) we again have that D(n) ≥ 3; thus n admits a decomposition of order at least 3.
  5. From implications (b), (c), and (d) we deduce that every positive integer that is not a power of 2 can be written as a sum of at least two consecutive positive integers, which completes part (2) of our monthly problem.
  6. From implications (a) through (d) we deduce that the positive integers that cannot be written as a sum of at least 3 consecutive integers are the powers of 2 and the prime numbers.

Further comments.
Two further applications of the basic formula for the sum of consecutive integers can be found in reference [2]. Bornsztein provided references [1] and [3]. In [3] the author investigates deeper properties of our decomposition number D(n); among other things he determines the number of decompositions of n into a sum of consecutive terms of an arithmetic sequence: n = a + (a+s) + (a + 2s) + ... .

References

[1] P. Bornsztein, Hypermath, Vuibert, exercice A-3.
[2] Robert A. Fontenot, Three Applications of a Familiar Formula. College Mathematics Journal, 27:5 (November, 1996), pages 356-360.
[3] W.J. Leveque, On Representations As a Sum of Consecutive Integers. Canadian Journal of Mathematics 2 (1950), pages 399-405.

 

Solution to MP30 by Wai Yan Pong's number theory class (CSU Dominguez Hills).

If n is a natural number which is not a power of 2, then n=m(2k+1) for some k. Since 0 is the sum of the following 2k+1 consecutive integers

         -k, -k+1, ..., 0, ..., k-1, k,

by adding m to each integer above we get 2k+1 consecutive integers that sum to m(2k + 1) + 0 = n.   Note that there will be some cancellations if m ≤ k.   Thus, we actually prove a little bit more, namely n can always be written as a sum of no more than p positive integers where p is the least odd prime factor of n .

Wai Yan Pong reports that the problem can also be found in AndreWeil's Number Theory for Beginners (Springer-Verlag, 1979).