Find the sum of all natural numbers between 1 and 100,

Question:

Find the sum of all natural numbers between 1 and 100, which are divisible by 2 or 5.

Solution:

We have to find the sum of all the natural numbers that are divisible by 2 or 5

Required Sum = Sum of the natural numbers between 1 and 100 that are divisible by 2 + Sum of the natural numbers between 1 and 100 that are divisible by 5 − Sum of the natural numbers between 1 and 100 that are divisible by 2 and 5, i.e by 10

$=(2+4+6+8+\ldots+98)+(5+10+15+\ldots+95)-(10+20+30+\ldots+90)$

$=\frac{50}{2}(2+98)+\frac{20}{2}(5+95)-\frac{10}{2}(10+90)$

$=2500+1000-500$

$=3000$

 

 

Leave a comment