How many positive integers less than or equal to 2015 are divisible by 3, but are neither divisible by 5 nor by 7?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Number divisible by 3 under 2015 are 671.
Numbers divisible by 5 in the list are also divisible by 3 ⋅ 5 = 1 5 . Numbers divisible by 15 under 2015 are 134.
Numbers divisible by 7 in the list are also divisible by 3 ⋅ 7 = 2 1 . Numbers divisible by 21 under 2015 are 95.
Total numbers divisible by 5 and 7 under 2015 are 1 3 4 + 9 5 = 2 2 9 .
Numbers divisible by 7 and 5 are repeated twice. So removing multiples of both 7 and 5 once will remove the repeats. Numbers divisible by 7 and 5 are also divisible by 3 ⋅ 5 ⋅ 7 = 1 0 5 . Number of multiples of 105 under 2015 are 19.
Therefore, numbers under 2015 which are multiple of 3, which are also multiple of 5 or 7 (or both) are 2 2 9 − 1 9 = 2 1 0 .
Numbers under 2015 which are divisible by 3 and are not multiples of 5 and 7 are 6 7 1 − 2 1 0 = 4 6 1