find sum of pos ints <= 10,000 div by 3 or 11 but not both

claudeluvstwilight

New member
Joined
Jul 11, 2008
Messages
1
Find the sum of all positive integers not greater than 10000 that are divisible by either 3 or 11 but not by both of them

Could someone please help me with this problem!!! Thanks SO much! :)
 
18,178,182

Computer programs are wonderfuil things.
 
Hello, claudeluvstwilight1

We are expected to be familiar with arithmetic series and this formula:

. . The sum of the first n positive integers is: n(n+1)2\displaystyle \text{The sum of the first }n\text{ positive integers is: }\:\frac{n(n+1)}{2}


Find the sum of all positive integers not greater than 10000
that are divisible by either 3 or 11, but not by both of them.

The sum of multiples of 3:

. . \(\displaystyle S_3\;=\;3 + 6 + 9 + \hdots + 9999 \;=\;3(1+2+3+\hdots+3333)\)
. . . . .=  3333333342  =  16,668,333\displaystyle =\;3\cdot\frac{3333\cdot3334}{2} \;=\;16,668,333


The sum of multiples of 11:

. . \(\displaystyle S_{11} \;=\;11 + 22 + 33 +\hdots+9999 \;=\;11(1+2+3+\hdots+909)\)
. . . . . =  119099102  =  4,549,545\displaystyle = \;11\cdot\frac{909\cdot910}{2} \;=\;4,549,545


The sum of multiples of 33:

. . \(\displaystyle S_{33} \;=\;33+66+99+\hdots+9999 \;=\;33(1+2+3+\hdots+303)\)
. . . . . =  333033042  =  1,519,848\displaystyle = \;33\cdot\frac{303\cdot304}{2} \;=\;1,519,848


Answer:   S3+S112S33  =  16,668,333+4,549,5452(1,519,848)\displaystyle \text{Answer: }\;S_3 + S_{11} - 2\cdot S_{33} \;=\;16,668,333 + 4,549,545 - 2(1,519,848)

. . . . . . . . =  18,178,182\displaystyle =\;\boxed{ 18,178,182}

 
Top