Math, asked by kamaljeetsingh519, 1 year ago

Find the sum of numbers from 1 to 100 which are neither divisible by 2,3 nor by 7

Answers

Answered by rohitkumargupta
4
Its simple find the sum of terms divisible by 21. And add this sum.

Sum of first 100 terms excluding terms divisible by 3 and 7 = Sum of first 100 terms - Sum of terms divisible by 3 - Sum of terms divisible by 21 + Sum of terms divisible by 21.

Because when you are subtracting the sum of terms divisible by 3 and sum of terms divisible by 7 few terms which are divisible by both subtracted twice. So add sum of terms divisible by 21.

Update - Answer with explanation.
Numbers divisible by 3 are 3, 6, 9, ...., 99.

Numbers divisible by 7 are 7, 14, 21, 28, ...., 98.

Numbers divisible by 21 are 21, 42, 63, 84.

Now we have sum of first 100 numbers not divisible by 3 and 7 is

(1 + 2 + 3 + .... + 100) - (3 + 6 + 9 + .... + 99) - (7 + 14 + 21 + .... + 98) + (21 + 42 + 63 + 84)

= (1 + 2 + 3 + .... + 100) - 3(1 + 2 + 3 + .... + 33) - 7(1 + 2 + 3 + .... + 14) + 21(1 + 2 + 3 + 4)

Using formula -

∑k=1nk=12(n)(n+1)
∑k=1nk=12(n)(n+1)
We have,

=12(100)(101)−3⋅12(33)(34)−7⋅12(14)(15)+21⋅12(4)(5)=12(100)(101)−3⋅12(33)(34)−7⋅12(14)(15)+21⋅12(4)(5)
=5050−1683−735+210=5050−1683−735+210
=2842
Similar questions