Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

How many positive integers between 100 and 999 inclusive

e) are divisible by 3 or 4?

For this problem, I understand that one has to employ the inclusion-exclusion principle.

Those integers divisible by 3:

Smallest: 102

Largest: 999

Set containing those divisible by 3: $\{102,...,999\}$ Factoring out a three from each element, and then taking the cardinality of that new set: $|\{34,35,36,37...,330,331,332,333\}| = 300$

Those integers divisible by 4:

Smallest: 100

Largest: 996

Set containing those divisible by 4: $\{100,...,996\}$ Factoring out a four from each elements, and then taking the cardinality of that new set: $|\{25,26,27,...,247,248,249\}|=225$

By simply adding numerical results will give a solution that over-counts. So, I need to subtract the number of integers divisible by both 3 and 4. Evidently, this is done by actually finding the number integers divisible by 12. Why is this so? Why isn't it that I find the smallest integer divisible by 3 and 4, and then find the largest integer divisible by 3 and 4?

share|improve this question
    
Why isn't it that I find the smallest integer divisible by 3 and 4, and then find the largest integer divisible by 3 and 4? Cause this way you would count twice the integers that are divisible by three and four! Is that clear? –  Albanian_EAGLE Apr 18 '13 at 15:03
    
The integers divisible by $12$ are actually the integers divisible by both $3$ and $4$. This is the case because $3$ and $4$ are relatively prime. –  Sam Apr 18 '13 at 15:04
add comment

2 Answers

up vote 1 down vote accepted

It should be clear that if an integer is divisible by $12$, then it is divisible by $3$ and $4$. Suppose an integer $n$ is divisible by $3$ and $4$, so that $$3k=n=4m$$ for some integers $k,m$. Then $4m$ is divisible by $3,$ so since $3$ is prime, then $4$ is divisible by $3$ or $m$ is divisible by $3$. The former is false, so $m=3j$ for some integer $j$, whence $$n=4m=12j,$$ so $n$ is divisible by $12$.

Thus, the integers divisible by $3$ and $4$ are precisely those divisible by $12$.

share|improve this answer
add comment

Number $N_n$ of positive integers divisible by $n$ in $[100,900]$ is $\lfloor\frac{999}n\rfloor-\lfloor\frac{100-1}n\rfloor$

So, $N_3=\lfloor\frac{999}3\rfloor-\lfloor\frac{100-1}3\rfloor=333-33=300$

Alternatively, numbers divisible by $3$ forms an Arithmetic Series with common difference $3$

If there are $r$ numbers starting and ending with $102,999$ respectively, $999=102+(r-1)3\implies r-1=\frac{999-102}3=99$

As you have pointed there is overlapping as we have twice counted the numbers which are divisible by both $3$ and $4$

Find $N_4,N_{12}$ to be $225,75$

So, the number of positive integers divisible by $3$ or $4$ is

the number of numbers divisible by $3$ +the number of numbers divisible by $4$ -the number of numbers divisible by $3$ and $4$

$=N_3+N_4-N_{12}$ as lcm$(3,4)=12$

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.