Nice Numbers
 
 
David W. Hansen
© 2008
 
       Some natural numbers can be written as a sum of consecutive integers; some can be written as a sum of consecutive even integers, and some can be written as a sum of consecutive odd integers. But, are there any natural numbers which can be written in all three of these ways; namely, as a sum of consecutive integers and a sum of consecutive even integers and a sum of consecutive odd integers? If so, that is nice, and we shall call these numbers nice numbers. Let’s see if there are any.
 
     (1)  From the article on Representing Natural Numbers by Sums of Consecutive Integers [1], we find that a natural number N can be written as a sum of consecutive integers if and only if it has at least one odd factor greater than 1.                                                                                                                            
 
     (2)  From the article on Representing Natural Numbers by Sums of Consecutive Even Integers [2], we find that a natural number N can be represented as a sum of consecutive even integers if and only if it can be written as a product of two factors, each greater than 1 and of opposite parity.                   
 
     (3)  From the article on Representing Natural Numbers by Sums of Consecutive Odd Integers [3], we find that 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, each greater than 1 and of the same parity.
 
       To satisfy (1), N must have an odd factor greater than 1.
 
       To satisfy (2), N must have an even factor, because N has an odd factor by (1).
 
       To satisfy (3), N must have two factors of the same parity. Now, N already has an odd factor by (1) and an even factor by (2). Since there is no number by which we can multiply the even factor to make it odd, we must multiply the odd factor by a multiple of 2 to make it even.  So, N must have two factors, both of which must be even. Then, since each of these two even factors is divisible by 2, then N must be divisible by 4. This gives us
 
                     Theorem 1 (Nice Numbers)
 
                      If a natural number N is divisible by 4 and has at least one odd factor
                      greater than 1, then it can be written as
                               a)  a sum of consecutive integers,
b)     a sum of consecutive even integers, and
c)      a sum of consecutive odd integers,
                       and is said to be a nice number.
                     _______________________________________________________
 
 
Example.   36 is a natural number which is divisible by 4 and has an odd factor, 9, so by Theorem 1 it is a nice number and can be written as a sum of consecutive integers, consecutive even integers, and consecutive odd integers. Let’s see how, using the procedures given in [1], [2], and [3].       
 
                          36    =    2(18)   =  18 + 18  
                                                     =  17 + 19                                        (consecutive odd integers)
 
                                  =     3(12)   =   12 + 12 + 12
                                                      =   11 + 12 + 13                                   (consecutive integers)   
 
                                   =      4(9)    =   9 + 9  +  9  +  9
                                                      =   6 + 8  + 10 + 12                         (consecutive even integers)
 
                                    =     6(6)    =   6 + 6 + 6 + 6 + 6 + 6
                                                      =   1 + 3 + 5  + 7 + 9 + 11                (consecutive odd integers)
 
                                    =     9(4)    =   4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4
                                                       =   0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8
                                                       =      1 + 2 + 3 + 4 + 5 + 6 + 7 + 8          (consecutive integers)
 

                                    =   12(3)   =     3  +   3   +   3   +   3  + 3 + 3  +  3 + 3 + 3 +  3  + 3  +  3

                                                      =  (-8) + (-6) + (-4) + (-2) + 0 + 2  +  4 + 6 + 8 + 10 +12 +14                                 

                                                      =   10 + 12 + 14                                   (consecutive even integers)

 

     Since 36 can be represented as sums of consecutive integers, consecutive even integers, and consecutive odd integers, it is a nice number. In fact, it can be represented by two and only two sums each of consecutive integers, consecutive even integers, and consecutive odd integers.
 
                                     36    =                     17 + 19                               (consecutive odd integers)
                                              =                10 + 12 + 14                          (consecutive even integers)
                                              =                11 + 12 + 13                               (consecutive integers)   
                                              =               6 + 8 + 10 + 12                       (consecutive even integers)
                                              =          1 + 3 + 5 + 7 + 9 + 11                  (consecutive odd integers)
                                              =   1 + 2 + 3 + 4 + 5 + 6 + 7 + 8                  (consecutive integers)
 
     Now, are there any numbers which can be written as a sum of consecutive integers, consecutive even integers, and consecutive odd integers in one and only one way? If so, then we shall call them very nice numbers indeed. Let’s try to find some.
 
     Since we wish to find numbers which can be expressed as sums of consecutive integers in one and only one way, it seems reasonable to look at numbers with very few factors so that the number of ways to write the different sums is small. By Theorem 1, we must have a factor of 4 in our number and at least one odd factor greater than 1. The simplest (and smallest) number which satisfies these conditions is   N = 4(3) = 12, and
 
                           12   =  3(4)  = 4 + 4 + 4 = 3 + 4 + 5  =  2 + 4 + 6 = 2(6) = 6 + 6 = 5 + 7.
     
These sums show that 12 can be written as a sum of consecutive integers, consecutive even integers, and consecutive odd integers in one and only one way, so 12 is a very nice number.
 
     What if we let N = 4p, where p is any odd prime? Then, the only ways that N can be written as a product of two factors greater than 1 are 4(p), 2(2p), (2p)2, and p(4).
 
 1)                                        N   =   4(p)   =     p   +    p    +    p    +    p
 
                                                                =   (p-3) + (p-1) + (p+1) + (p+3),
 
                    which, since p is odd, gives us one and only one sum of consecutive even integers.
 
   2)                                        N   =   2(2p)  =      2p      +     2p
 
                                                                    =    (2p-1)   +   (2p+1)
 
                                which gives us one and only one sum of consecutive odd integers.
 
   3)                 N = ka = (2p)2 =    2 + 2 + . . . + 2 + 2 + . . . + 2 + 2    (2p addends of 2).   
 
          Since the two factors of N are of the same parity, we can write this as a sum of consecutive odd integers, where, using Theorem 1 of [3], we have the first term F = a – (k-1) = 2 – (2p-1) and the last term
L = a + (k-1) = 2 + (2p-1), giving us
  
 N  =           F        +         (F+2)    +  .  .  .  +         (L-6)      +          (L-4)     +          (L-2)   +         L
 
       =  [ 2 – (2p-1) ] + [2 – (2p-1) + 2]  + . . . + [2 + (2p-1) - 6] + [2 + (2p-1) - 4] + [2 + (2p-1) - 2] + [2 + (2p-1)]
        
       =     (3 - 2p)     +      (5 - 2p)     +  . . . +      (2p-5)      +         (2p-3)    +       (2p-1)      +      (2p+1)   
 
       =   [ -(2p-3) ]  +    [ -(2p-5) ]   +  . . . +      (2p-5)     +         (2p-3)    +       (2p-1)      +      (2p+1)
 
       =                                                       0                                                  +        (2p-1)     +      (2p+1)
 
       =                                                  (2p-1)    (2p+1),
 
which is the same sum of consecutive odd integers as in 2). This shows that for the product of two even factors, order is not important and does not yield any new sums of consecutive odd integers.
 
 
4)       N =  ka = p(4)      (p addends of 4)
 
      Since one of the two factors of N, namely p, is odd and greater than 1, we can write this as a sum of consecutive integers, where, using Theorem 3 of [1], we have the first term F = a – (k-1)/2 =
4 – (p-1)/2 = (9 - p)/2 and the last term L = a + (k-1)/2 = 4 + (p-1)/2 = (p + 7)/2. Thus,
 
       N       =             4          +  . . .  +   4    +     4    + 4  +     4    +     4    +  . . . +        4  
            
                   =    (9 - p)/2 + . . .  + (4-2) + (4-1) + 4 + (4+1) + (4+2) + . . . + (p+7)/2                                                                                           
                               which gives us one and only one sum of consecutive integers.                    
 
     1) through 4) show that there is one and only one way to write N = 4p as a sum of consecutive integers, consecutive even integers, and consecutive odd integers. Thus, we have
 
                  Theorem 2   (Very Nice Numbers)
 
                  Any natural number N of the form 4p, where p is an odd prime, can be written as
                               a)  a sum of consecutive integers,
b)     a sum of consecutive even integers, and
c)      a sum of consecutive odd integers,
                   in one and only one way and is said to be a very nice number.
                  ________________________________________________________________
   
Example. Using the first five odd primes, 3, 5, 7, 11, and 13, and Theorem 2, we find that the first five very nice numbers are N = 4p = 4(3), 4(5), 4(7), 4(11), and 4(13) = 12, 20, 28, 44, and 52. Their unique representations as sums of consecutive integers, consecutive even integers, and consecutive odd integers are as follows:
 
                    12   =   3(4)     =      4 + 4 + 4       =       3 + 4 + 5
                                 4(3)     =   3 + 3 + 3 + 3   =       2 + 4 + 6
                                 2(6)     =         6 + 6          =          5 + 7
 
                    20   =    5(4)    =   4 + 4 + 4 + 4 + 4     =         2 + 3 + 4 + 5 + 6
                                  4(5)    =       5 + 5 + 5 + 5       =            2 + 4 + 6 + 8
                                2(10)    =           10 + 10           =                 9 + 11
 
                    28   =    7(4)    =   4 + 4 + 4 + 4 + 4 + 4 + 4    =        1 + 2 + 3 + 4 + 5 + 6 + 7
                                  4(7)    =            7 + 7 + 7 + 7              =                 4 + 6 + 8 + 10
                                2(14)    =                14 + 14                   =                    13 + 15
 
                    44   =   11(4)   =         4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4  
                                             =      (-1) + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9
                                                                                                       =       2 + 3 + 4 + 5 + 6 + 7 + 8 + 9
                                4(11)   =            11 + 11 + 11 + 11              =                8 + 10 + 12 + 14
                                2(22)   =                     22 + 22                       =                       21 + 23
 
                    52   =   13(4)   =           4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 
                                           =    (-2) + (-1) + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10
                                                                                                       =      3 + 4 + 5 + 6 + 7 + 8 + 9 + 10
                                4(13)   =            13 + 13 + 13 + 13              =              10 + 12 + 14 + 16
                                2(26)   =                     26 + 26                       =                       25 + 27
   
     Since N = 4p gives us numbers which can be written as a sum of consecutive integers, consecutive even integers, and consecutive odd integers in one and only one way, let’s see what would happen if we let
N = 4p2. If we do this, then the only ways that N can be written as a product of two factors greater than 1 are:
     
                                     2(2p2)   and  2p(2p) for sums of consecutive odd integers,
                                       4(p2)   and   4p(p) for sums of consecutive even integers, and
                                      p(4p)   and   p2(4) for sums of consecutive integers.
   
Note: 2p2(2) will give the same sum as 2(2p2) since these are the product of the same two even factors but in different order. See [3].
 
 1a)                                        N   =   2(2p2)   =           2p2      +       2p2 
 
                                                                        =      (2p2 - 1)    (2p2 + 1),
 
                    which, since p is odd, gives us one sum of consecutive odd integers.
 
 
  1b)            N   =   ka   =   2p(2p)   =   2p + 2p + . . . + 2p  +  2p + . . . + 2p + 2p.    (2p addends)    
 
          Since the two factors of N are of the same parity, we can write this as a sum of consecutive odd integers, where, using Theorem 1 of [3], we have the first term F = a – (k-1) = 2p – (2p-1) = 1, and the last term L = a + (k-1) = 2p + (2p-1) = 4p-1, giving us
 
                                   N   =     1 + 3 + 5 + . . . + (4p-3) + (4p-1),
 
                     which is a second sum of consecutive odd integers.
 
   2a)                               N   =   4(p2)   =         p2     +       p2      +        p2      +     p2
 
                                                              =    (p2 - 3)   +  (p2 - 1)   +   (p2+1)   +   (p2+3),
 
                      which, since p is odd, gives us one sum of consecutive even integers.
 
 
   2b)                   N = ka =  (4p)p =    p + p + . . . + p + p + . . . + p + p    (4p addends of p).   
 
          Since the two factors of N are of opposite parity, we can write this as a sum of consecutive even integers, where, using Theorem 1 of [2], we have the first term F = a – (k-1) = p – (4p-1) = - 3p + 1 and the last term L = a + (k-1) = p + (4p-1) = 5p-1, giving us
 
                                       N   =       (- 3p + 1) +  . . .  + (5p -1)
               
                                            =        - (3p - 1) +  . . .  + (3p-1) + (3p+1) +  . . .  + (5p-1)
 
                                            =                             0                 + (3p+1) + . . . + (5p-1)
 
                                            =           (3p+1) + . . . + (5p-1),
 
                                    which is a second sum of consecutive even integers.
 
 
  3a)          N   =   ka   =   p(4p).      (p addends of 4p)
 
       Since one of the two factors of N, namely p, is odd and greater than 1, we can write this as a sum of consecutive integers, where, using Theorem 3 of [1], we have the first term F = a – (k-1)/2 =4p – (p-1)/2
= (7p + 1)/2 and the last term L = a + (k-1)/2 = 4p + (p-1)/2 = (9p -1)/2. Thus,
 
                                                      N   =       (7p+1)/2 + . . . + (9p -1)/2
               
                                          which gives us one sum of consecutive integers.                   
 
 
     3b)     N   =  ka  =   (p2)4.      (p2 addends of 4)
 
        Again, since one of the two factors of N, namely p2, is odd and greater than 1, we can write this as a sum of consecutive integers, and, using Theorem 3 of [1], the first term   F  =  a – (k-1)/2   =  4 – (p2 -1)/2   =
 (9 – p2)/2, and the last term L  =  a + (k-1)/2  =  4 + (p2 -1)/2  =  (p2 + 7)/2.  Thus,
 
                           N   =       (9 - p2)/2 + . . . + (p2 + 7)/2
               
                                =        - (p2 - 9)/2 + . . . + (p2 -9)/2 + (p2 - 7)/2) + . . . + (p2 + 7)/2
 
                                =                             0                 + (p2 - 7)/2) + . . . + (p2 + 7)/2
 
                                =           (p2 - 7)/2 + . . . + (p2 + 7)/2,
           
                     which gives us a second sum of consecutive integers.                   
    
     1a) through 3b) show that there are two and only two ways each to write N = 4p2 as a sum of consecutive integers, consecutive even integers, and consecutive odd integers. Thus, we have
 
                  Theorem 3   (Very Nice Numbers of Order 2)
 
                  Any natural number N of the form 4p2, where p is an odd prime, can be written as
                               a) a sum of consecutive integers,
b) a sum of consecutive even integers, and
c) a sum of consecutive odd integers,
                   each in two and only two ways and is said to be a very nice number of order 2.
                   _________________________________________________________________                  
 
 
                                Given below are formulas for the various sums of N = 4p2.
 
                   Consecutive integers:           N   =     (7p+1)/2     + . . . +    (9p-1)/2
                                                                          =     (p2 - 7)/2    + . . . +   (p2 + 7)/2
 
                   Consecutive even integersN   =      (p2 - 3)   +   (p2 - 1)   +   (p2+1)   +  (p2+3)
                                                                         =              (3p+1) + . . . + (5p-1)
 
                   Consecutive odd integers:    N   =                   (2p2 -1)    (2p2 +1)
                                                                          =   1   +   3   +   5   +   . . .   +   (4p-3)   +   (4p-1)
                 __________________________________________________________________
    
ExampleDetermine if 100 is a very nice number of order 2 and, if so, use the formulas above to find all of its sums of consecutive integers, consecutive even integers, and consecutive odd integers.   Since 100 =
4(25) = 4(52), we see it can be written in the form 4p2, where p = 5 is an odd prime. Thus, 100 is a very nice number of order 2. Using p = 5 and the formulas above, we find its various sums to be:
 
   Consecutive integers:           N   =         (7p+1)/2     + . . . +    (9p-1)/2 
                                                         =               18 + 19 + 20 + 21 + 22  
                                                         =         (p2 - 7)/2    + . . . +   (p2 + 7)/2
                                                         =     9 + 10 + 11 + 12 + 13 + 14 + 15 + 16
                                                                 
   Consecutive even integers: N   =      (p2 - 3)   +   (p2 - 1)   +   (p2+1)   +   (p2+3)
                                                         =                  22 + 24 + 26 + 28
                                                         =              (3p+1) + . . . + (5p-1)
                                                         =              16 + 18 + 20 + 22 + 24
 
   Consecutive odd integers:    N  =                   (2p2 -1)    (2p2 +1)
                                                         =                             49 + 51
                                                         =        1 +  3  +  5  + . . .   + (4p-3) + (4p-1)
                                                         =      1 + 3 + 5 + 7 + 9 + 11 + 13 + 15 + 17 + 19
 
   
     Theorems 2 and 3 tell us the number of ways we can write a natural number N as a sum of consecutive integers, consecutive even integers, and consecutive odd integers; namely, in only one way if N = 4p, or in two ways if N = 4p2. Let’s now look at values of N with higher powers of p to see if we can write N in more ways than one or two as sums of consecutive integers, consecutive even integers, and consecutive odd integers. Accordingly, let’s write N = 2kpm, where k and m are natural numbers and p is an odd prime.
 
Consecutive integers   Theorem 3 of [1] states that “If n is the number of odd factors greater than 1 of N, then there will be n different ways to write N as a sum of two or more consecutive integers.” Now, N = 2kpm has m odd factors, one for each power of p;   namely,   p(2kpm-1), p2(2kpm-2), .  .  . , pm(2k), thus
 
                                       N can be written in m ways as a sum of consecutive integers.                            (1)
   
Consecutive even integers Theorem 1 of [2] states that “The number of ways that N can be written as a sum of consecutive even integers equals the number of ways that N can be written as the products of two factors, each greater than 1 and of opposite parity.” Since we must have opposite parity, one of the two factors must always contain only powers of p, which is odd, and the other factor must always contain the 2k, which is even. Now, N = 2kpm can be written as a product of two factors of opposite parity in just the following m ways:
    p(2kpm-1),      p2(2kpm-2),   .   .   .   ,    pm(2k), thus
 
                                       N can be written in m ways as a sum of consecutive integers.                            (2)
  
Consecutive odd integers    Theorem 1 of [3] states that “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.” Since we must have the same parity, both factors must be odd, or both must be even. But both factors cannot be odd because N contains powers of 2. So one factor must be even, and in order to get the same parity, the other factor must also be even. Thus, both factors must contain a power of 2. Now, N = 2kpm can be written as a product of two even factors in only the following ways: 
  
                                                                             k -1 columns
 
                             2(2k-1pm),         22(2k-2pm),      23(2k-3pm),   .  .   .   ,   2k-2(22pm),         2k-1(2pm
      
                           2p(2k-1pm-1),     22p(2k-2pm-1),   23p(2k-3pm-1),  .  .   .   , 2k-2p(22pm-1),     2k-1p(2pm-1)
 
                          2p2(2k-1pm-2),   22p2(2k-2pm-2),  23p2(2k-3pm-2),  .  .   .   , 2k-2p2(22pm-2),  2k-1p2(2pm-2)
      
     m + 1 rows                                                           .      .      .  
 
                          2pm-2(2k-1p2),   22pm-2(2k-2p2),    23pm-2(2k-3p2), .  .   .   , 2k-2pm-2(22p2),   2k-1pm-2(2p2)
 
                          2pm-1(2k-1p),     22pm-1(2k-2p),    23pm-1(2k-3p),   .  .   .   ,    2k-2pm-1(22p),    2k-1pm-1(2p)
 
                            2pm(2k-1),         22pm(2k-2),          23pm(2k-3),    .  .   .   ,    2k-2pm(22),        2k-1pm(2)
 
                                              The total number of entries above is (k-1)(m+1).
 
                Except for order, which is unimportant, (see [3]), we see that the
 
                                                     1st row is the same as the m+1st row,
                                                     2nd row is the same as the mth row,
                                                     3rd row is the same as the m-1st row, etc.
 
     If m is odd, then there will be an even number (m+1) of rows of which one-half will be the same.  Thus,
 
         N can be written as a sum of consecutive odd integers in (k-1)(m+1)/2 ways if m is odd.          (3)
  
Example  Let N = 23p5 = 8p5, where k = 3 and m = 5.
 
                Number of ways that N = 23p5 = 8p5 can be written as a product of two even factors.
                                             
                                                              k – 1 = 2   columns
                                                         ___________________                            
                              
                                                              2(4p5)         4(2p5)
                                                             2p(4p4)       4p(2p4)
                                                             2p2(4p3)      4p2(2p3)
                   m + 1 =  6 rows
                                                             2p3(4p2)      4p3(2p2)    duplicate of row 3
                                                              2p4(4p)       4p4(2p)      duplicate of row 2
                                                               2p5(4)         4p5(2)       duplicate of row 1
  
                Except for order, which is unimportant, (see [3]), note that the
 
                                                     1st row is the same as the 6th row,
                                                     2nd row is the same as the 5th row,
                                                     3rd row is the same as the 4th row
                                                     
Thus, there are (6 rows) x (2 columns) = 12 entries above, but since the last three rows are duplicates of the first three rows, we divide by two, which is (k-1)(m+1)/2 = (3-1)(5+1)/2 = 6 ways.
  
     If m is even, then there will be an odd number (m+1) of rows. The first m/2 rows will be duplicated (except for order) by the last m/2 rows (from row (m/2)+2 to row m+1. There will be a middle row (m/2+1) with k-1 entries to be counted also. Thus, there will be   (m/2)(k-1) + (k-1) = (k-1)(m/2 + 1) = (k-1)(m+2)/2 entries. So,
 
         N can be written as a sum of consecutive odd integers in (k-1)(m+2)/2 ways if m is even.        (4)
 
                                                                   k - 1 columns
                                         1       ___    ___    ___    ___    ___    ___              
                                         2       ___    ___    ___    ___    ___    ___                   These m/2 rows
                                         3       ___    ___    ___    ___    ___    ___                 and k – 1 columns          
                                                                                                                                          give us
                                                                   .    .    .    .    .                                                (m/2)(k-1)       
                                      m/2       ___    ___    ___    ___    ___    ___                          entries.
 
      m+1 rows           m/2 + 1     ___    ___(the middle row)__    ___             k-1 entries in this row
 
                                  m/2 + 2     ___    ___    ___    ___    ___    ___   x             
                                                                                                                              These rows (marked x)
                                                                           .      .      .                          x            are duplicates of the
                                                                                                                                 first m/2 rows above.
                                         m       ___    ___    ___    ___    ___    ___    x          
                                     m + 1     ___    ___    ___    ___    ___    ___    x      
     
Example  Let N = 23p4 = 8p4, where k = 3 and m = 4.
 
                Number of ways that N = 23p4 = 8p4 can be written as a product of two even factors.
                                             
                                                         k – 1 = 2   columns
                                                   ---------------------------------                              
                                                           2(4p4)         4(2p4)                 (m/2)(k-1) = 2(2) = 4
                 m/2 = 4/2 = 2 rows         2p(4p3)       4p(2p3)
                                                   
                 m + 1 = 5 rows              2p2(4p2)      4p2(2p2)             middle row   k-1 = 3-1 = 2
                  
                                                           2p3(4p)      4p3(2p)                  duplicate of row 2
                                                            2p4(4)        4p4(2)                   duplicate of row 1
 
                Except for order, (which is unimportant, (see [3]), we see that the
 
                                                     1st row is the same as the 5th row, and
                                              the 2nd row is the same as the 4th row,
                                        but the  3rd row is not the same as any other row.
                                                    
     Thus, we count the entries in the first two rows above plus the entries in the middle column, which is
   (m/2)(k-1) + (k-1)  =  (4/2)(3-1) + (3-1)  =  2(2) + 2  =  6 ways.
  
     Now, from (1), (2), (3), and (4) above, we know that the number of ways we can write N = 2kpm as a sum of consecutive integers or consecutive even integers is m, and letting n be the number of ways we can write N as a sum of consecutive odd integers, we know that n = (k-1)(m+1)/2 if m is odd, and n = (k-1)(m+2)/2 if m is even.
  
     Thus,                                n   =   (k-1)(m+1)/2   =   (k-1)[(m+1)/2],    if m is odd,
 
and                                        n   =   (k-1)(m+2)/2   =   (k-1)[(m+2)/2]     if m is even.
 
Since k -1 is an integer, we have     n is a multiple of  (m+1)/2 if m is odd,
 
and                                                       n is a multiple of (m+2)/2 if m is even,                               giving us
 
            Theorem 4  Let N = 2kpm, where k and m are natural numbers and p is an odd prime.
               Then, N can be written as  
              a) a sum of consecutive integers in m ways,
                 b) a sum of consecutive even integers in m ways, and
                 c) a sum of consecutive odd integers in n ways, where
                       1) n  =  (k-1)(m+1)/2  if m is odd,     which is a multiple of (m+1)/2, and
                                       2)  n  =  (k-1)(m+2)/2  if m is even,   which is a multiple of (m+2)/2.
           ______________________________________________________________________
  
  
Example   Find the number of ways that 34,992 can be written as a sum of consecutive integers, as a sum of consecutive even integers, and as a sum of consecutive odd integers.  34,994 = 16(2187) = 2437. Thus, k = 4 and m = 7. By Theorem 4, 34,992 can be written as a sum of consecutive integers in m = 7 ways, as a sum of consecutive even integers in m = 7 ways, and, since m is odd, as a sum of consecutive odd integers in n = (k-1)(m+1)/2 = (4-1)(7+1)/2 = 12 ways.
  
Example   Find a natural number N which can be written as a sum of consecutive integers and as a sum of consecutive even integers each in 8 ways and as a sum of consecutive odd integers in 5 ways. Since N can be written in 8 ways as a sum of consecutive integers and as a sum of consec-utive even integers, m = 8. Since N can be written in 5 ways as a sum of consecutive odd integers, and m is even, then n = (k-1)(m+2)/2
= 5. Substituting m = 8 into this equation, we have (k-1)(8+2)/2 = 5, (k-1)(5) = 5, k-1 = 1, and   k = 2.Thus,
N = 2kpm = 22p8 = 4p8 for any positive prime p.
    
Example   Can we find a natural number N = 2kpm which can be written in 5 ways as a sum of consecutive integers, in 5 ways as a sum of consecutive even integers, and in 4 ways as a sum of consecutive odd integers? Now, m = 5 and n = 4, so the answer is no, because by Theorem 5, n must be a multiple of (m+1)/2 = (5+1)/2 = 3, which it is not. If n were 3, 6, 9, or any multiple of 3, then our answer would be yes. 
   
Example  In how many ways can a natural number N = 2kpm be written as a sum of consecutive odd integers if it can be written in 8 ways as a sum of consecutive integers and in 8 ways as a sum of consecutive even integers?  Now m = 8, and Theorem 5 tells us that n must be a multiple of (m+2)/2 = (8+2)/2 = 5. Thus, the number of ways that N can be written as a sum of consecutive odd integers is a multiple of 5; namely, n = 5, 10, 15, 20, 25, .  .  .      
  
     Finally, let’s use Theorem 4 to see if we can find any values of N which can be written in the same number of ways as sums of consecutive integers, consecutive even integers, and consecutive odd integers. For this to happen, the number of ways to write N as sums of consecutive integers and sums of consecutive even integers (namely, m) must equal the number of ways to write N as sums of consecutive odd integers (namely, n). Using Theorem 4, we find that
  
       a) if m is odd,                         m = n                                                           k        m
                                                       m = (k-1)(m+1)/2,                                   ------------------
                                                     2m =  km + k – m – 1                                   1         0
                                             3m - km = k – 1                                                     2         1
                                             m(3 – k) = k – 1                                                     3     no value
                                                        m = (k-1)/(3-k)                                            4       - 3
                                                                                                                           
          Substituting positive values of k into this last equation, we get the table above. Since m must be positive, there is only one solution; namely, k = 2, m = 1. This gives us N = 22p1 = 4p as natural numbers which can be written as sums of consecutive integers, consecutive even integers, and consecutive odd integers in m = 1 way, which we had found earlier to be very nice numbers.
                                                                                                                              
       b) if m is even,                      m = n                                                             k       m
                                                      m = (k-1)(m+2)/2,                                      ------------
                                                    2m = km + 2k – m – 2                                   1        0
                                            3m - km =   2k – 2                                                  2        2
                                            m(3 – k) = 2k – 2                                                   3    no value
                                                       m = (2k-2)/(3-k)                                           4       - 6   
                                                                                                                      
          Substituting positive values of k into this last equation, we get the table above. Since m must be positive, there is only one solution; namely, k = 2, m = 2. This gives us N = 22p2 = 4p2 as natural numbers which can be written as sums of consecutive integers, consecutive even integers, and consecutive odd integers in m = 2 ways, which we had also found earlier to be very nice numbers of order 2.
 
     Thus, the only values of N = 2kpm which can be written in the same number of ways as sums of consecutive integers, consecutive even integers, and consecutive odd integers are N = 4p (very nice numbers) and N = 4p2 (very nice numbers of order 2).
 
 
 
[1]   Hansen, David W., Representing Natural Numbers by Sums of Consecutive Integers.
                         (mathematics1.fortunecity.com/ConsecutiveIntegers.html)
 
[2]   Hansen, David W., Representing Natural Numbers by Sums of Consecutive Even Integers.
                        (mathematics1.fortunecity.com/ConsecutiveEvenIntegers.html)
 
[3]   Hansen, David W., Representing Natural Numbers by Sums of Consecutive Odd Integers.
                         (mathematics1.fortunecity.com/ConsecutiveOddIntegers.html)                     

 

Home