askvity

How many numbers are there between 1 and 1000 both inclusive which are divisible neither by 2 nor by 5?

Published in Number Theory 1 min read

The number of integers between 1 and 1000, inclusive, that are divisible by neither 2 nor 5 is 400.


Here's how to arrive at the solution:

  • Total Numbers: There are 1000 numbers between 1 and 1000 (inclusive).
  • Divisible by 2: Half of these numbers are divisible by 2. That's 1000 / 2 = 500 numbers.
  • Divisible by 5: 1000 / 5 = 200 numbers are divisible by 5.
  • Divisible by both 2 and 5: These are numbers divisible by 10 (2 * 5). There are 1000 / 10 = 100 such numbers.


We can use the principle of inclusion-exclusion to determine how many numbers are divisible by either 2 or 5 (or both). The numbers divisible by either 2 or 5 will be:

(Numbers divisible by 2) + (Numbers divisible by 5) - (Numbers divisible by both 2 and 5)

500 + 200 - 100 = 600


Therefore, there are 600 numbers that are divisible by either 2 or 5.


To find the number of numbers that are divisible by neither 2 nor 5, we subtract the count of numbers that are divisible by either 2 or 5 from the total number of numbers between 1 and 1000.

1000 - 600 = 400.


The reference states that the correct answer is indeed 400.


Related Articles