How many integers between 1 and 2014 are divisible by either
Solution
Number divisible by 5={5,10,...,2010}
we need to check how many numbers between 5 and 2010 are divisible by 5 which is given by
(2010-4)/5 = 2006/5. The nearest integer count greater than 2006/5 is 401.
Number divisible by 7={7,14,....2009}
we need to check how many numbers between 7 and 2009 are divisible by 7 which is given by
(2009-6)/7 = 2003/7. The nearest integer count greater than 2003/7 is 286.
Number divisible by 11={11,22,...,2013}
we need to check how many numbers between 11 and 2013 are divisible by 11 which is given by
(2013-10)/11 = 2003/11. The nearest integer count greater than 2003/11 is 182
Now we check how many numbers are divisible by 5 or 7
Now we need to eliminate the numbers which were divisible by both 5 and 7.
Numbers divisible by both - {35, ,....,1995}
This can be done by (1995-34)/35 . The nearest count greater than is 56.
Using Inclusion-Exclusion principle,
|A U B| = |A| + |B| - |A intersection B|
so number of elements are divisible by 5 or 7=401+286-186=701
also the number of elements divible by 7 and 11={77,..2002}
so nunber of elementsboth divible by 7 and 11=2006-76/77=25
so number of elements are divisible by 7 or 11=286+186-25=447
elements divisible by 11 and 5={55,...1815}
number of elements divisible by 5 and 11=1815-54/55=32
elements divible by 5,7,11={385,...1925}
number of elements divisible by 5,7,and 11=1925-384/385=4
so number of elements divisible by 5,7 or11=401+286+186-56-25-32-4=756
.
