Step 1: Finding sum of integers from 1 to 100 divisible by 2.
Integers divisible by 2 between 1 to 100 are
2,4,6,8,…100
This is an A.P. as
First term = a=2
common difference d=4−2=2
Last term = l=100
2,4,6,8,….100 Number of terms =n=1002=50
S50=502[2+100]
⇒ S50=502[102]
S50=502[102]
S50=50×51
⇒S50=2550 ...(i)
Hence, the sum of integers from 1 to 100 divisible by 2 is 2550.
S50=2550 ...(i)
Step 2. Finding sum of integers from 1 to 100 divisible by 5.
Integers divisible by 5 between 1 to 100 are
5,10,15,20,…100
This is an A.P. as
First term =a=5
common difference d=10−5=5
Last term =an=l=100
l=a+(n−1)d
⇒100=5+(n−1)5
⇒100−5=(n−1)5
⇒95=(n−1)5
⇒ 955=(n−1)
⇒n=19+1
⇒n=20
So,
S20=202[5+100]
S20=10×105
⇒ S20=1050 ...(ii)
Hence, the sum of integers from 1 to 100 divisible by 5 is 1050.
S50=2550...(i)
S20=1050...(ii)
Step 3. Finding sum of integers from 1 to 100 divisible by both 2 and 5.
Integers divisible by 2 and 5 between 1 to 100 are,
10,20,30,………90,100
This is an A.P. as
First term =a=10
common difference d=20−10=10
Last term =an=l=100
l=a+(n−1)d
⇒100=10+(n−1)10
⇒100−10=(n−1)10
⇒90=(n−1)10
⇒ 9010=(n−1)
9010=(n−1)
⇒n=9+1
⇒ n=10
So,
S10=102[10+100]
⇒S10=5×110
S10=550 ...(iii)
Hence, the sum of integers from 1 to 100 divisible by 2 and 5 is 550.
S50=2550 ...(i)
S20=1050 ...(ii)
S10=550 ...(iii)
Step 4. Finding sum of integers from 1 to 100 divisible by 2 or 5
Sum of integers divisible by 2 or 5= (sum of integers divisible by 2) + ( sum of integers divisible by 5) − (sum of integers divisible by 2 & 5)
Putting values from (i),(ii) & (iii)
Sum of integers divisible by 2 or 5= 2550+1050−550
Sum of integers divisible by 2 or 5=2550+1050−550
Sum of integers divisible by 2 or 5=3050