Representing Natural Numbers by Sums
                                 of Consecutive Odd Integers
 
David W. Hansen
© 2004
 
            Using the ordering method (perhaps modified) from the article Representing Natural Numbers by
     Sums of Consecutive Integers (you can find it here), let’s see which natural numbers (if any) can be
     written as a sum of consecutive odd integers. Now,
 
           1 can only be represented by 1, which is not a sum.
 
     2 = 1 + 1, which is not a sum of consecutive odd integers.
 
           3 = 1 + 2, which is not a sum of consecutive odd integers.
 
           4 = 1 + 3, which is the smallest natural number which can be written as a sum of consecutive odd
     integers. Note that 4 = 2(2) = 2 + 2, and if we use the ordering method and pivot about the + sign, we
     get (2 – 1) + (2 + 1) = 1 + 3.
 
           5 = 1 + 4, or 2 + 3, which are not sums of consecutive odd integers.
 
           6 = 1 + 5, or 2 + 4, or 3 + 3, or 1 + 2 + 3, which are not sums of consecutive odd integers.
 
           7 = 1 + 6, or 2 + 5, or 3 + 4, or 1 + 2 + 4, which are not sums of consecutive odd integers.
 
           8 = 2(4) = 2 4’s = 4 + 4 = (4 – 1) + (4 + 1) = 3 + 5 (if we pivot on the + sign and use the ordering
     method). Thus, 8 can be written as a sum of consecutive odd integers. 
 
           9 = 3(3) = 3 3’s = 3 + 3 + 3. If we use the middle 3 as the pivot and subtract and add 2 from the
     addends one unit to the left and right of this pivot, we get    9 = 3 + 3 + 3 = (3 – 2) + 3 + (3 + 2) =
     1 + 3 + 5, a sum of consecutive odd integers. We added and subtracted 2 (rather than 1) because  
     consecutive odd integers differ by 2.
 
          Looking at these examples. it appears that the ordering method works only if a natural number can
     be written as a product of two even factors or two odd factors; that is, only if its two factors have the same
     parity.   
 
          Thus, we would expect that 10 = 1(10) or 2(5) could not be written as a sum of consecutive odd
     integers, and indeed, this is the case, for 10 = 1(10) = 10 is not a sum, and for 10 = 2(5) = 5 + 5, by
     pivoting on the + sign, we get (5 – 1) + (5 + 1) = 4 + 6, which is not a sum of consecutive odd
     integers.
 
           11 = 1(11) cannot be represented as a sum of consecutive odd integers.
 
            12 = 1(12) = 2(6) = 3(4), and only the underlined pair of factors yields a sum of consecutive odd
     integers; namely 12 = 2(6) = 6 + 6 = 5 + 7 (pivoting on the + sign).
            Note that if we use 12 = 6(2) = 2 + 2 + 2 + 2 + 2 + 2 and pivot on the middle + sign, we get
      (2 – 5) + (2 – 3) + (2 – 1) + (2 + 1) + 2 + 3) + (2 + 5)   =   (-3) + (-1) + 1 + 3 + 5 + 7 = 5 + 7 as before, since
      the underlined terms total zero. It appears that commuting the factors does NOT give a different sum of 
      consecutive odd integers (unless we accept negative integers in our sums).  
 
           24 = 1(24) = 2(12) = 3(8) = 4(6), and only the underlined pairs of factors have the same parity and
     yield a sum of consecutive odd integers. Thus,
 
                                                   24 = 2(12) = 12 + 12 = (12–1) + (12+1)  =  11 + 13, and
 
                                 24  =  4(6)  =  6 + 6 + 6 + 6  =  (6–3) + (6–1) + ( 6+1) + (6+3)  =  3 + 5 + 7 + 9.
 
            Note that there are two ways to write 24 as a pair of factors with the same parity, and there are two
     ways to represent 24 as a sum of consecutive odd integers.
 
             In general, when factoring a natural number into pairs of factors, we will exclude the factor 1, since for 
     any natural number N = 1(N) = N, we get only the number N which is not a sum of consecutive odd
     integers.
 
           105 = 3(35) = 5(21) = 7(15). Since both factors in each one of these pairs of factors have the same
      parity, each pair will give us a sum of consecutive odd integers. Thus,
 
                          105  =  3(35) = 35 + 35 + 35 = (35-2) + 35 + (35+2) = 33 + 35 + 37
 
                                        5(21) = 21 + 21 + 21 + 21 + 21 = (21-4) + (21-2) + 21 + (21+2) + (21+4)
 
                                                   = 17 + 19 + 21 + 23, and
 
                                        7(15)  =        15   +   15    +    15   +  15  +     15     +     15    +    15
 
                                                   =    (15-6) + (15-4) + (15-2) + 15 + (15 + 2) + (15+4) + (15 + 6)
 
                                                   =          9 + 11 + 13 + 15 + 17 + 19 + 21.
 
            Note that there are three ways to write 105 as a pair of factors with the same parity, and there are 
     three ways to represent 105 as a sum of consecutive odd integers.
 
            In general, suppose that a natural number N is written as a sum of k addends of a; that is,
          
                                     N =   ka = a + a + a .  .  . + a + a,         where there are k of the a’s.
 
     k odd
          Now, if k is odd, then there will be a middle term a, which we call the pivot, and we get
 
                                                                  N   =   a + a + . . . + a + . . . + a + a  
 
                                                      The (Modified) Ordering method for k odd.
 
            First, add and subtract 2 from the two addends a, which are one unit to the right and the left of the 
     pivot. Next, add and subtract 4 from the two addends a, which are two units to the right and left of the 
     pivot. Then, add and subtract 6 from the two addends a, which are three units to the right and left of the
     pivot. In general, add and subtract 2p from the two addends a, which are p units to the right and left of the
     pivot.
 
            Since there are k of the a’s, and the pivot is one of them, then there will be k–1 a’s equally distributed
     about the pivot, half of them to its left and half of them to its right. Thus, there are  m  =  (k-1)/2  a’s  to the
     left and  m  =  (k-1)/2  a’s  to the right of the pivot. This gives us
 
                       N   =        a        +  .  .  .  +    a    +   a    +    a    +  a +     a    +    a     +    a    +  .  .  .  +     a  
 
                       N   =   (a – 2m) +  .  .  .  + (a-6) + (a-4) + (a-2) + a + (a+2) + (a+4) + (a+6) +  .  .  .  + (a + 2m)  
 
      Letting m = (k-1)/2, we get
 
        N  =  [a – 2(k-1)/2] + . . . + (a-6) + (a-4) + (a-2) + a + (a+2) + (a+4) + (a+6) + . . . + [a + 2(k-1)/2]  
 
        N  =    [a – (k-1)]     + . . . + (a-6) + (a-4) + (a-2) + a + (a+2) + (a+4) + (a+6) + . . . +     [a + (k-1)].           (1)  
 
            Since the pivot a does not change, then a must be odd if this is to be a sum of consecutive odd 
     integers, so both k and a are odd and hence of the same parity. Furthermore, the first term of this sum of
     consecutive odd integers is a – (k-1), and the last term is a + (k-1).
 
     k even 
            Now if k is even, then there will be an even number of addends a, an odd number of + signs, and we
      shall call the middle + sign the pivot. We thus get
 
                                                       N   =   a  +  a  +  .  .  .  +  a  +  a  +  .  .  .  +  a  +  a.  
 
                                                        The (Modified) Ordering method for k even.
 
            First, add and subtract 1 from the two addends a, which are one unit to the right and the left of the
     pivot. Next, add and subtract 3 from the two addends a, which are two units to the right and left of the
     pivot. Then, add and subtract 5 from the two addends a, which are three units to the right and left of the 
     pivot.  In general, add and subtract 2p-1 from the two addends a, which are p units to the right and left of
     the pivot.
            Continuing in this manner and noting that there are m = k/2 a’s distributed equally to the left and right
     of the + pivot, we get
 
           N   =            a         +  .  .  .  +    a    +   a    +    a    +    a      +    a     +   a     + .  .  .  +       a  
 
                 =   [a – (2m-1)] + .  .  .  + (a-5) + (a-3) + (a-1) + (a+1) + (a+3) + (a+5) + .  .  .  + [a + (2m-1)].  
      Since m = k/2, we get
 
                 N = [a – (2(k/2)-1)] + . . . + (a-5) + (a-3) + (a-1)  +  (a+1) + (a+3) + (a+5) + . . . + [a + 2(k/2)-1]  
 
                 N =     [a – (k-1)]     + . . . + (a-5) + (a-3) + (a-1)  +  (a+1) + (a+3) + (a+5) + . . . +   [a + (k-1)].        (2)  
 
             If a is odd, then all the terms in (2) will be even. But then this will give us a sum of consecutive even
      integers! Thus, a cannot be odd and must therefore be even for us to get a sum of consecutive odd
      integers. So both k and a are even and hence of the same parity.  
 
            Now, note that the first and last terms of both (1) and (2) are identical, so the first and last terms of any
      sum of consecutive odd integers will be a – (k-1) and a + (k-1), no matter whether k is odd or even.   This
      gives us
 
                      Theorem 1
 
                   A natural number N can be represented as a sum of consecutive odd integers if and only if
                   it can be written as a product of two factors , k and a, each greater than 1 and of the same
                   parity. The first term of the sum is F = a – (k-1), and its last term is L = a + (k-1), where
                   N = ka, and k is the number of terms. The number of ways that N can be written as a sum
                   of consecutive odd integers equals the number of ways that N can be written as the product
                   of two factors, both greater than 1 and of the same parity.
              __________________________________________________________________________
 
            Theorem 1 tells us that no prime number can be written as a sum of consecutive odd integers,
      since no prime can be written as a product of two integers, both greater than 1.
 
            It also tells us that N can be written as a sum of consecutive odd integers if and only if
        a)     N is odd but not prime, or
        b)     N is even and divisible by 4.     Here’s why.
 
            a) If N is not prime, then it can be written as a product of two factors greater than 1, and if
                N is also odd, then these factors must all be odd, since if one were even, then N would be even. 
               Thus, both factors will be of the same parity and greater than 1, and by Theorem 1, N can then
                be represented as a sum of consecutive odd integers. 
    
            b) If N is even, then it must have two even factors if it is to be written as a sum of consecutive odd
                integers, for if one factor were odd, then both factors would not be of the same parity. And if N
                has two even factors, then each of these factors will have a factor of 2, and N will have a factor
                of 4.
 
          Example. Since 17 is a prime and 58 = 2(29) is not divisible by 4, neither of these natural numbers can
      be written as a sum of consecutive odd integers. However, 315 (an odd natural number but not prime) and
      80 (an even integer divisible by 4) are natural numbers which can be written in the desired form. Here’s
      how.
 
          315 = 3(3)(5)(7) = 3(105) = 5(63) = 7(45) = 9(35) = 15(21). Since each of these 5 pairs of factors has
      factors which are of the same parity and greater than 1, there will be 5 ways to write 315 as a sum of
      consecutive odd integers. Using Theorem 1, we have
 
       a)  315 = 3(105), where k = 3, and a = 105. Then, the first term F = a – (k-1) = 105 – (3-1) = 103,
        and the last term L = a + (k-1) = 105 + (3-1) = 107. Thus,
 
                                                                   315   =  103 + 105 + 107.       (3 terms)
 
       b)  315 = 5(63), where k = 5, and a = 63. Then, the first term F = a – (k-1) = 63 – (5-1) = 59,
        and the last term L = a + (k-1) = 63 + (5-1) = 67. Thus,
 
                                                             315   =   59 + 61 + 63 + 65 + 67.     (5 terms)
 
       c)  315 = 7(45), where k = 7, and a = 45. Then, the first term F = a – (k-1) = 45 – (7-1) = 39,
        and the last term L = a + (k-1) = 45 + (7-1) = 51. Thus,
 
                                                 315    =    39 + 41 + 43 + 45 + 47 + 49 + 51.       (7 terms)
 
        d)  315 = 9(35), where k = 9, and a = 35. Then, the first term F = a – (k-1) = 35 – (9-1) = 27,
         and the last term L = a + (k-1) = 35 + (9-1) = 43. Thus,
 
                                     315    =    27 + 29 + 31 + 33 + 35 + 37 + 39 + 41 + 43.       (9 terms)
 
        e)  315 = 15(21), where k = 15, and a = 21. Then, the first term F = a – (k-1) = 21 – (15-1) = 7,
         and the last term L = a + (k-1) = 21 + (15-1) = 35. Thus,
 
                315 = 7 + 9 + 11 + 13 + 15 + 17 + 19 + 21 + 23 + 25 + 27 + 29 + 31 + 33 + 35.   (15 terms)
 
       Thus, 315 =                                                  103 + 105 + 107
                                                                       59 + 61 + 63 + 65 + 67
                                                               39 + 41 + 43 + 45 + 47 + 49 + 51
                                                      27 + 29 + 31 + 33 + 35 + 37 + 39 + 41 + 43
                                7 + 9 + 11 + 13 + 15 + 17 + 19 + 21 + 23 + 25 + 27 + 29 + 31 + 33 + 35
 
 
       80 = 2(2)(2)(2)(5) = 2(40) = 4(20) = 5(16) = 8(10). Since there are 3 products whose factors are of the
     same parity and greater than 1 (those which are underlined), there will be 3 different sums of consecutive
     odd integers which represent 80. Using Theorem 1, we have
 
       a)  80 = 2(40), where k = 2, and a = 40. Then, the first term F = a – (k-1) = 40 – (2-1) = 39,
        and the last term L = a + (k-1) = 40 + (2-1) = 41. Thus,
 
                                                                             80   =   39 + 41.       (2 terms)
 
        b)  80 = 4(20), where k = 4, and a = 20. Then, the first term F = a – (k-1) = 20 – (4-1) = 17,
         and the last term L = a + (k-1) = 20 + (4-1) = 23. Thus,
 
                                                                80   =  17 + 19 + 21 + 23.       (4 terms)
 
        c)  80 = 8(10), where k = 8, and a = 10. Thus, the first term F = a – (k-1) = 10 – (8-1) = 3,
         and the last term L = a + (k-1) = 10 + (8-1) = 17. Thus,
 
                                                    80   =   3 + 5 + 7 + 9 + 11 + 13 + 15 + 17.       (8 terms)
 
        Thus, 80 =                                                           39 + 41
                                                           17 + 19 + 21 + 23
                                               3 + 5 + 7 + 9 + 11 + 13 + 15 + 17
 
         Note that if we had used 10(8) instead of 8(10), we would have gotten:
 
           80 = 10(8), where k = 10, and a = 8. Then, the first term F = a – (k-1) = 8 – (10-1) = - 1, and the last
      term L = a + (k-1) = 8 + (10-1) = 17. Thus,
 
                                                80   =   - 1 + 1 + 3 + 5 + 7 + 9 + 11 + 13 + 15 + 17,       (10 terms)
 
      but since the underlined terms cancel out, we get the same sum as we did when using 8(10). Thus,
      commuting the factors does not give us any new sums.
 
                                                                        Home
______________________________________________________________________