find the sum of all positive number less than 200 that are divisible by 3 or 5.
Answers
Answered by
2
The numbers divisible by 5 are { 5, 10, 15, ...180, 185, 190, 195 }
Let there be N5 = 39 numbers in this set. Apply the usual Arithmetic
progression formula for the sum.
Sum of these numbers S5: 39/2 [ 2*5 +38*5] = 3900
Numbers divisible by 3 are { 3, 6, 9, 12, 15, ..... 180, ..., 195, 198 }
Let there be N3 = 66 numbers in this set.
Sum : S3 = 66/2 [2*3+65*3] = 6633
Numbers divisible by both are : { 15, 30, .... 180, 195 } .
let there be N15 = 13 numbers in this set.
These numbers are present in both sets. they will be counted & added twice.
Sum : S15 = 13/2 [ 2*15+12*15] = 1365
Sum of the Numbers which we want are = S5 + S3 - S15 =
= 3900 + 6633 - 1365 = 9168
Let there be N5 = 39 numbers in this set. Apply the usual Arithmetic
progression formula for the sum.
Sum of these numbers S5: 39/2 [ 2*5 +38*5] = 3900
Numbers divisible by 3 are { 3, 6, 9, 12, 15, ..... 180, ..., 195, 198 }
Let there be N3 = 66 numbers in this set.
Sum : S3 = 66/2 [2*3+65*3] = 6633
Numbers divisible by both are : { 15, 30, .... 180, 195 } .
let there be N15 = 13 numbers in this set.
These numbers are present in both sets. they will be counted & added twice.
Sum : S15 = 13/2 [ 2*15+12*15] = 1365
Sum of the Numbers which we want are = S5 + S3 - S15 =
= 3900 + 6633 - 1365 = 9168
Similar questions