Thank you for registering.

One of our academic counsellors will contact you within 1 working day.

Please check your email for login details.
MY CART (5)

Use Coupon: CART20 and get 20% off on all online Study Material

ITEM
DETAILS
MRP
DISCOUNT
FINAL PRICE
Total Price: Rs.

There are no items in this cart.
Continue Shopping

Ques. The Sum of the integers from 1 to 100 which are not divisible by 3 or 5 is (Give solution)

Ques. The Sum of the integers from 1 to 100 which are not divisible by 3 or 5 is
  

(Give solution)

Grade:12th pass

1 Answers

Sourabh Singh IIT Patna
askIITians Faculty 2104 Points
6 years ago


Hii

look up the solution to get tyhe approach how to proceed


Sum of all numbers 1 to 100:
S = n[2a1 + (n - 1)d]/2
= 100[2(1) + (100 - 1)]/2
= 100(101)/2
= 5050

Sum of all numbers 3 to 99, multiples of 3:
S = n[2a1 + (n - 1)d]/2
= 33[2(3) + (33 - 1)3]/2
= 33(6 + 96)/2
= 1683

Sum of all numbers 5 to 100, multiples of 5:
S = n[2a1 + (n - 1)d]/2
= 20[2(5) + (20 - 1)5]/2
= 20(10 + 95)/2
= 1050

Sum of all numbers 15 to 90, multiples of 15:
S = n[2a1 + (n - 1)d]/2
= 6[2(15) + (6 - 1)15]/2
= 6(30 + 75)/2
= 315

Sum of integers from 1 to 100 which are not divisible by 3 and 5:
S = sum(1-100) - sum(3-99) - sum(5-100) + sum(15-90)
= 5050 - 1683 - 1050 + 315
= 2632

We have to add in the sum(15-90) because in removing sum(3-99) and sum(5-100), we're taking out multiples of 15 twice. Adding sum(15-90) ensures that we only take out 15 once, 30 once, etc.

Think You Can Provide A Better Answer ?

Provide a better Answer & Earn Cool Goodies See our forum point policy

ASK QUESTION

Get your questions answered by the expert for free