Writing Numbers as Sums of Multiples in Consecutive Order

David W. Hansen, 2010
  
      Let’s start by writing numbers as sums of multiples of 3 in consecutive order. 
 
         27  =  3(9)  =    9    +   9  +     9              84  =  7(12)  =  12 + 12 + 12 + 12 + 12 + 12 + 12
                               (9-3)  +   9  +  (9+3)                                  3  +  6  +  9 +  12 + 15 + 18 + 21
 
                                  6    +   9   +   12
  
                         189 =  3(63) =                                  63 + 63 + 63
                                                                                60 + 63 + 66
                                   
                                =  9(21)  =       21 + 21 + 21 + 21 + 21 + 21 + 21 + 21 + 21                               
                                                        9 + 12 + 15 + 18 +  21 + 24 + 27 + 30 + 33 
 
                                                          - - - - - - - - - - - - - - - - - 21 9's - - - - - - - - - - - - - - - - - - -
                               =  21(9)   =         9 + 9 + 9 + . . . . . . . . . . . . . . . . . . . . . . . + 9 + 9 + 9
 
      - - - - - - - - - - - - - - - - 10 9's - - - - - - - - - - - - one 9  - - - - - - - - - - - - -10 9's - - - - - - - - - - - - - - - - -
                                                                              
      [9 - 3(10)] + . . . . . . . .+ [(9 - 3(2)]+ [9-3(1)] + 9 + [9+3(1)] + [9 + 3(2)] + . . . . . . . . + [9 + 3(10)]
                                 (9 - 30) + . . . . . . . . . . . . . . . . . . . . . . . . . . + (9 + 30)
                  [(-21)  +  (-18)  + . . . + 9  + . . . + 18 +  21]  +  24  +  27  +  30  +  33  +  36  +  39 
                                                    24 + 27 + 30 + 33 + 36 + 39

    In general, N must be the product of an odd number, say A and a multiple of 3, say m. Then,
  
                                                                       N = Am,  A m's 
  -------------------------- (A-1)/2 m's -------------------------- 1m -------------------------- (A-1)/2 m's -----------------------------
  [m - 3(A-1)/2]  + . . . . . + [m-3(2)] + [m-3(1)]  +  m  +  [m+3(1)] + [m+3(2)] + . . . . . + [m + 3(A-1)/2]
   
                                     F = first term  = m  -  3(A-1)/2;   if F < 0, then F  =  - F + 3.     
                                     L = last term   = m  + 3(A-1)/2    n = number of terms =  ( L - F)/3 + 1
 
     
                                  Writing Numbers as Sums of Multiples of k in Consecutive Order


      Generalizing the above work for multiples of 3 to multiples of k, we get
  
                    N must be the product of an odd number, say a, and a multiple of k, say m. Then,
 
                                                                N = am,  a m's 
  -------------------------- (a-1)/2 m's ----------------------- 1 m  ----------------------- (a-1)/2 m's -------------------------------
  [m - k(a-1)/2]  + . . . . . . +  (m-2k)  +  (m-k)  +  m  +  (m+k)  +  (m+2k)  +  . . . . . .  +  [m + k(a-1)/2]
       [m - d]      + . . . . . . +  (m-2k)  +  (m-k)  +  m  +  (m+k)  +  (m+2k)  +  . . . . . . +   [m +  d],    (1)
 
                                                               where d = k(a-1)/2.
 
     If m > d, then the first term F = m - d, and the last term L = m + d, as shown in (1) above.  
  
     If m < d, then m - d < 0, and we have
  
[-(d - m)] + . . . + (m-2k) + (m-k) + m + (m+k) + (m+2k) + . . . + (d - m)] + [(d - m) + k] +. . .+[m +  d]
 
                                 =      0  +   [(d - m) + k]   +  . . .  +   [m + d].                                              (2)
 
     Then, F = d - m + k   and   L = m + d, as shown in (2).
 
     We shall call corresponding terms those terms which are an equal number of units to the left and right of the
central pivot m. Thus, m - k and m+ k are corresponding terms as well as m - 2k and m + 2k, and so on.  Notice
that the first term and last term are corresponding terms.
 
                        Procedure for Writing a Number N as a Sum of Multiples of k in Consecutive Order
 
               N  must be the product of an odd number a and the desired multiple m of k = 1, 2, 3, . . .                                              
                                                               N  =  am

                    F = first term         L = last term         n = number of terms         d = k(a-1)/2     
                                               S = sum of any two corresponding terms     

                                        a)    If m > d, then from (1), we have
 
                                                  F  =  m -  d                S  =   F +  L  =  2m
                                                  L  =  m + d                n  =  (L - F)/k + 1  =  2d/k + 1  =  a
                                                              

                                         b)    If m < d, then from (2), we have 
 
                                                   F  =  d - m + k           S  =  F + L   =   2d + k  =  ka
                                                   L  =  m + d                n  =  (L - F)/k + 1  =  2m/k
      
                        In all cases,                  n  =  (L - F)/k + 1.
                              
Examples
 
1. Write 60 as a sum of 5 consecutive multiples of 4.    We write 60 as a product of the odd number 5 and a multiple of 4; namely,
                                                                   60  =  5(12).
 
    Then,  a = 5 (the odd number), m = 12 (a multiple of 4), and k = 4 (the desired multiple).  Following the procedure above, we get
                                                           d = k(a-1)/2 = 4(5-1)/2  = 8.
 
           Since m > d (12 > 8), we use procedure a) above to get
 
                   F  =  m - d   =   12  - 8  =   4           S  =     F+ L  =  2m  =  2(12)  =  24
                   L  =  m + d  =  12 + 8  =  20           n  =  (L - F)/k + 1  =  (20 - 4)/4 + 1 = a = 5 terms
 
    Thus, our sum of consecutive multiples of 4 will have 5 terms, starting at 4 and ending at 20, and the sum of its first and last terms (or any two of its corresponding terms) will be 24, giving us
 
                                                           60  =  4 + 8 + 12 + 16 + 20,
 
    or we could do this:                       60  =  5(12)  =  12 + 12 +
12
+ 12 + 12
                                                                             4 +  8 +  12 + 16 + 20,                 
 
where we have added and subtracted increasing multiples of 4 from the numbers to the right and left of the middle pivot 12.

2. Write 189 as a sum of consecutive multiples of 7.    We must write 189 as a product of an odd number and a multiple of 7; for example,
                                                      odd number - - - - >    /<- - - - - - multiple of 7
                                                                      189  =  9(21).

     Then,  a = 9 (the odd number), m = 21 (a multiple of 7), and k = 7 (the desired multiple).  Following the procedure above, we get
                                                            d = k(a-1)/2 = 7(9-1)/2  = 28.
 
           Since m < d (21 < 28), we use procedure b) to get
 
         F  =  d - m + k  =   28 - 21 + 7  =  14             S  =   F+ L  =  2d + k  =  2(28) + 7  =  63
         L  =  m + d  =  21 + 28  =  49                       n  =  (L - F)/k + 1  =  (49 - 14)/7 + 1  =  6 terms
                                                                              =   2m/k  =  2(21)/7  =  6 terms 

    Thus, our sum of consecutive multiples of 7 will have 6 terms, starting at 14 and ending at 49, and the sum of any two of its corresponding  terms will be 63, giving us
                       
                                              189  =  14 + 21 + 28 + 35 + 42 + 49,
 
or we could do this:            189  =  9(21)  =  21 + 21 + 21 + 21 + 21 + 21 + 21 + 21 + 21
                                                            (-7) + 0  +  7  + 14 + 21 + 28 + 35 + 42 + 49                 
                                                                        14  + 21 + 28 + 35 + 42 + 49
 
where we have added and subtracted increasing multiples of 7 from the numbers to the right and left of the middle pivot 21,
 
or this:                                          189  =  3(63)  =               63 + 63 + 63  
                                                                                         56 + 63 + 70
 
    Check:  a = 3,    m = 63,    k = 7,    d =  k(a-1)/2  =  7(3-1)/2  =  7.    Since m > d, we use procedure a).
 
                       F  =  m - d   =  63  - 7  =  56                  S  =  2m  =  126
                       L  =  m + d  =  63 + 7  =  70                  n  =  (L - F)/k + 1  =  a  =  (70 - 56)/7 + 1 = 3
 

3. Write 330 as a sum of consecutive multiples of a) 1, b) 2, c) 3, d) 5, e) 6, f) 10, g) 15, h) 30.   Now, all the desired multiples  in a) through g) are all factors of 1(2)(3)5 = 30, so we let m = 30 and write
     
                        330  = 11(30),         a = 11,         m = 30,         d = k(a-1)/2 = k(11-1)/2 = 5k,        
 
and                   330  =  11(30)         =  30 + 30 + 30 + 30 + 30 + 30 + 30 + 30 + 30 + 30 + 30

 
     a)  k = 1,   d = 5k = 5,   m = 30 > d,  F  =  m - d  =  30  -  5  =  25          S = F + L = 25 + 35 = 60
                                                          L  =  m + d  =  30 + 5  =  35           n = a = 11        
 
                                             330   =   25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35     

 
     b)  k = 2,    d = 5k = 10,  m = 30 > d,    F  =  m - d  =  30  - 10  =  20        S = F + L = 20 + 40 = 60
                                                              L  =  m + d  =  30 + 10  =  40       n = a = 11
 
                                              330   =   20 + 22 + 24 + 26 + 28 + 30 + 32 + 34 + 36 + 38 + 40

                      
     c)  k = 3,    d = 5k = 15,   m = 30 > d,    F  =  m  - d  =  30  - 15  =  15       S = F + L = 15 + 45 = 60  
                                                               L  =  m + d  =  30 + 15  =  45       n = a = 11
 
                                               330   =   15 + 18 + 21 + 24 + 27 + 30 + 33 + 36 + 39 + 42 + 45     
 
 
     d)  k = 5,   d = 5k = 25,     m = 30 > d,    F =   m - d   =  30  - 25  =   5        S = F + L = 5 + 55 = 60
                                                                L  =  m + d  =  30 + 25  =  55       n = a = 11
 
                                              330   =    5 + 10 + 15 + 20 + 25 + 30 + 35 + 40 + 45 + 50 + 55    


     e) k = 6,   d = 5k = 30,   m = 30 < d,    
 
                               F =  d - m + k  = 30 - 30 + 6 =   6          S = 2d + k = 60 + 6 = 66
                               L =    m + d     =    30 + 30   =  60         n = 2m/k = 60/6 = 10
 
                                              330   =     6 + 12 + 18 + 24 + 30 + 36 + 42 + 48 + 54 + 60                
 
     f)  k = 10,   d = 5k = 50,   m = 30 < d,   
 
                                F =  d - m + k  = 50 - 30 + 10  =  30        S = 2d + k = 100 + 10 = 110
                                L =    m + d     =    30 + 30     =   80       n = 2m/k = 60/10 = 6   
 
                                              330   =           30 + 40 + 50 + 60 + 70 + 80                

 
     g)   k = 15,   d = 5k = 75,   m = 30 < d,  
 
                                 F =  d - m + k  = 75 - 30 + 15 =   60        S = 2d + k = 150 + 15 = 165
                                 L =    m + d     =    30 + 75    =  105        n = 2m/k = 60/15 = 4
 
                                              330   =                    60 + 75 + 90 + 105                             

     h)  k = 30,  d = 5k = 150,  m = 30 < d,  
 
                                  F =  d - m + k  =  150 - 30 + 30  = 150     S = 2d + k = 300 + 30 = 330
                                  L =    m + d     =      30 + 150    = 180     n = 2m/k = 60/30 = 2
 
                                              330   =                            150 + 180                                      

       In addition, 11 is a factor of 330  =  2(3)5(11), so we can write 330 as a sum of consecutive multiples of 11 as follows:
                                  330  =  3(110)  =       110      +   110    +      110
                                                             (110 - 11)  +   110    +  (110 + 11)
                                                                  99       +   110   +      121
 
                                   330  =  5(66)  =       66  +  66  +  66  +  66  +  66  
                                                                44  +   55  +  66  +  77  +  88
 
                                   330  =  15(22),     where a = 15, m = 22, k = 11, d = k(a-1)/2 = 11(14)/2 = 77.
                                                              Since m < d, F = d - m + k = 77 - 22 + 11 = 66   
                                                                                L = m + d = 22 + 77 = 99
 
                                                             =            66  +  77  +  88  +  99

     In general, to write N as sums of all possible multiples of k in consecutive order, we do the following:
 
                                1. Write N as a product of prime factors.
                                2. Choose a as the smallest odd prime factor of N.
                                3. Write N = am. Then, m will contain all the possible multiples k (except for a)
                                    which can be used to write N as sums of multiples in consecutive order.
                                4. Finally, pick another odd prime factor of N to use for a in order to write N as a sum
                                    of multiples in consecutive order of the original a.
 
Example    Let N = 210. Following the above procedure, we have
 
               1. N = 210 = 2(3)5(7)
               2. We pick a = 3 (the smallest odd prime factor of 210).
               3. We write 210 = am = 3(70), where m = 70 = 1(2)5(7) contains all the possible multiples k
                  (except for a = 3); namely, 1, 2, 5, 7, 10, 14, 35, and 70, which can be used in writing 210
                  as sums of multiples in consecutive order. Here’s what we get (using the easy way!)
 
                                                                                                  Consecutive multiples of
                                            210 = 3(70) =     70 + 70 + 70              
                                                                         69 + 70 + 71                      1
                                                                         68 + 70 + 72                      2
                                                                         65 + 70 + 75                      5
                                                                         63 + 70 + 77                      7
                                                                         60 + 70 + 80                     10
                                                                         56 + 70 + 84                     14
                                                                         35 + 70 + 105                    35
                                                                           0 + 70 + 140                  
                                                                             70 + 140                       70
                                                             
               4. Finally, to write 210 as a sum of multiples of the original a = 3 in consecutive order, we pick
                   a = 5 as another odd prime factor of 210 and write
 
                                               210 = 5(42) =   42 + 42 + 42 + 42 + 42
                                                                     36 + 39 + 42 + 45 + 48,   
 
                   which is a sum of consecutive multiples of 3.
               
 
     Now, the sums found for 210 above are not the only sums that can be found. If we don’t pick the smallest odd prime for N in step 1, we can get                                            
 
               1. N = 210 = 2(3)5(7)
               2. We pick a = 7 (the largest odd prime factor of 210).
              3. We write 210 = am = 7(30), where m = 30 = 1(2)3(5) contains all the possible multiples k
                  (except for a = 7); namely, 1, 2, 3, 5, 6, 10, 15, and 30, which can be used in writing 210
                  as sums of multiples in consecutive order. Here’s what we get (using the easy way!)
 
                                                                                                               Consecutive multiples of
                            210 = 7(30) =     30 + 30 + 30 + 30 + 30 + 30 + 30              
                                                         27 + 28 + 29 + 30 + 31 + 32 + 33                     1
                                                         24 + 26 + 28 + 30 + 32 + 34 + 36                     2
                                                         21 + 24 + 27 + 30 + 33 + 36 + 39                     3
                                                         15 + 20 + 25 + 30 + 35 + 40 + 45                     5
                                                         12 + 18 + 24 + 30 + 36 + 42 + 48                     6
 
                                                           0 + 10 + 20 + 30 + 40 + 50 + 60                  
                                                              10 + 20 + 30 + 40 + 50 + 60                      10
 
                                                         - 15 + 0 + 15 + 30 + 45 + 60 + 75                  
                                                                      30 + 45 + 60 + 75                             15
 
                                                  (- 60) + (- 30) + 0 + 30 + 60 + 90 + 120              
                                                                              90 + 120                                  30
                                                                            
                                                             
               4. Finally, to write 210 as a sum of multiples of the original a = 7 in consecutive order, we pick
                   a = 3 as another odd prime factor of 210 and write
 
                                               210 = 3(70) =   70 + 70 + 70
                                                                     63 + 70 + 77,   
 
                   which is a sum of consecutive multiples of 7.
 
                                                                          Home