To Find: The sum of all natural numbers from 1 to 100 which are divisible by 4 or 5.
A number divisible by both 4 and 5 should be divisible by 20 which is the LCM of 4 and 5.
Sum of numbers divisible by 4 OR 5 = Sum of numbers divisible by 4 + Sum of numbers divisible by 5 - Sum of numbers divisible by both 4 and 5.
Sum of numbers divisible by 4 = 4+8+12+....100
= 4(1+2+3+.....25) = 4 x 25/2[2+24] = 50 x 26 = 1800
Sum of numbers divisible by 5 = 5 +10+15+20+......100 = 5(1+2+3+.....20)
= 5 x 20/2[2+19] = 50 x 21 = 1050
Sum of numbers divisible by 20 = 20+40+60+.... 100
= 20(1+2+3+4+5) = 20 x 15 = 300
Required sum = 1800+1050 - 300 = 2550
Sum of numbers which are divisible by 4 or 5 is 2550