

Given integers are: 1,2,3,......................,100
Number that are divisible by2 are: 2,4,6,............100
It forms an AP. Let n is the number of term in this AP
l = a + (n-1)*d
=> 100 = 2 + 2(n-1)
=> 100-2 = 2(n-1)
=> 98 = 2(n-1)
=> n-1 = 98/2
=> n-1 = 49
=> n = 49+1
=> n = 50
Now Sum = (n/2) * (a+l)
= (50/2)*(2+100)
= 25*102
= 2550
Number that are divisible by 5 are: 5, 10,15,................,100
It forms an AP. Let n is the number of term in this AP
l = a + (n-1)*d
=> 100 = 5 +5(n-1)
=> 100-5 = 5(n-1)
=> 95= 5(n-1)
=> n-1 = 95/5
=> n-1 = 19
=> n = 19+1
=> n = 20
Now Sum = (n/2) * (a+l)
= (20/2)*(5+100)
= 10*105
= 1050
Number that are divisible by both 2 and 5 are: 10, 20,35,................,100
It forms an AP. Let n is the number of term in this AP
l = a + (n-1)*d
=> 100 = 10 +10(n-1)
=> 100-10 = 10(n-1)
=> 90= 10(n-1)
=> n-1 = 90/10
=> n-1 = 9
=> n = 9+1
=> n = 10
Now Sum = (n/2) * (a+l)
= (10/2)*(10+100)
= (10*110)/2
= 10*55
= 550
So sum of integers that are divisible by 2 or 5 is = 2550 + 1050 - 550 = 3600 - 605 = 3050
