the sum of integers from 1 to 100 which are not divisible by 3 or 5 is.
Answers
Sum of integers which are not divisible by 3 or 5 = sum of first 100 natural numbers – sum of multiples of 3 – sum of multiples of 5 + sum of multiples of both 3 and 5
Sum of first 100 natural numbers = n(n+1)/2
= 100(101)/2
= 5050
Sum of multiples of 3 = 3 + 6 + 9+..99
Here a = 3 and d = 3
an = a+(n-1)d = 99
3+(n-1)3 = 99
3n = 99
n = 99/3= 33
Sn = (n/2)(2a+(n-1)d)
= (33/2)(2×3+(33-1)3)
= (33/2)(6+32×3)
= (33/2)×102
= 1683
Sum of multiples of 5 = 5 + 10 + 15+…100
Here a = 5 and d = 5
an = a+(n-1)d = 100
5+(n-1)5 = 100
5n = 100
n = 100/5= 20
Sn = (n/2)(2a+(n-1)d)
= (20/2)(2×5+19×5)
= 10×105
= 1050
Sum of multiples of both 3 and 5 = 15 + 30 + 45 +…90
Here n = 6
a = 15, d = 15
Sum = (6/2)(15+90)
= 315
Required sum = 5050 – 1683- 1050 +315
= 2632
Solution -:
let us is 1 + 2 + 3 + ...+100
[ n =100 a =1 ]
50× 101 =5050
let's S1 = 3+6+9....+99
= 50×21 = 1050
Required sum = S - S1 - S2+ S3
= 5050-1683-1050+315
= 2632
Answer is 2632