Find the sum of all numbers less than1000 which are exactly divisible by 2 3 4,5,6 and 7
Answers
Step-by-step explanation:
How many numbers are there between 1 to 1000 which are divisible by 2,3,4,5?
First, note that all numbers divisible by 4 are divisible by 2. So we can basically “ignore” 4 since it is included by 2.
Second, I will reword the question slightly to say “how many positive integers less than or equal to 1000”. Since we are looking at values in this manner, we can simply divide 1000 by the divisor we are considering, round down, and this should be the count of numbers divisible by the divisor.
2: 10002=500 so 500 of these numbers are divisible by 2.
3: 10003=333.33333 so 333 of these numbers are divisible by 3.
5: 10005=200 so 200 are divisible by 5.
Add it all up: 500+333+200=1033 .
But wait, we actually have more than 1000 numbers there. What happened? Well, we counted some numbers two or three times. Some numbers are divisible by 2 or even all 3 of the values, so we eneded up counting these multiple times, so we need to remove these “repeat” counts.
So how many are divisible by 2 and 3? Well, anything divisible by 2*3=6. 10006=166.666 so we need to remove 166 values.
2 and 5: anything divisible by 2*5=10: 100010=100 .
3 and 5: anything divisible by 3*5=15: 100015=66.666 so 66.
So at this point, we have 1033–166–100–66=701 .
701 is less than 1000, so it isn’t obviously wrong, but I would ask: What about numbers that were divisible by all 3 values? We added them in 3 times in the first part. But then we removed them 3 times in the second part. So they are now in there 0 times. So we need to add them back in…
Which numbers are divisible by 2, 3, and 5? Any number divisible by 2*3*5=30. 100030=33.3333 so we need to add 33 back in.
Finally we arrive at: 701+33=734 .