# Counting

• Aug 7th 2007, 02:48 PM
ff4930
Counting
The problem
How many positive integers from 100-999 are divisible by 7.

I want to confirm if my approach is the best approach in finding the answer.
The smallest integer that can be divided by 7 is

105+112+119+126+133+140+147+154+161+168+175+182+18 9+196

there are 14 numbers divisible by 7 from the range 100-200 so from 100-900 would be 9*14 = 126 numbers there is still 99 numbers unaccounted for
but the answer in my textbook states 128 numbers in total. How is that possible?
• Aug 7th 2007, 02:56 PM
CaptainBlack
Quote:

Originally Posted by ff4930
The problem
How many positive integers from 100-999 are divisible by 7.

I want to confirm if my approach is the best approach in finding the answer.
The smallest integer that can be divided by 7 is

105+112+119+126+133+140+147+154+161+168+175+182+18 9+196

there are 14 numbers divisible by 7 from the range 100-200 so from 100-900 would be 9*14 = 126 numbers there is still 99 numbers unaccounted for
but the answer in my textbook states 128 numbers in total. How is that possible?

The first number in the range divisible by 7 is 105, then every 7th number is
divisible by 7, and so there are a total of floor[(999-105)/7] +1 =128 such
numbers.

RonL
• Aug 7th 2007, 03:08 PM
Plato
Here is another way using the floor function.
$\left\lfloor {\frac{{999}}{7}} \right\rfloor - \left\lfloor {\frac{{99}}{7}} \right\rfloor = 128$
• Aug 7th 2007, 03:15 PM
ff4930
Thank You guys for the reply, I was doing it the long way =/.
but one thing can I do [999-100]/7 I still got the same answer if I rounded down

There are 1 more thing that is confusing me.

same problem as before but finding the integers that are divisible by 3 or 4
I found all the numbers divisble by 3 which is 300 and divisble by 4 which is 225, but the answer is 450.

and when they ask is not divisible by either 3 or 4, do I count the numbers that are divisible by 1-9 excluding 3 and 4? but the answer is 450 as well.

and when they ask is divisible by 3 and not 4, how would I approach this

Im really sorry for all these questions but as some of you may experience, my professor is not the very best at teaching and every lesson, I find myself reading the textbook and have a puzzled look. I also have a final coming up so any help would be appreciated.
Thank You again in advance.
• Aug 7th 2007, 03:25 PM
ThePerfectHacker
Use the Inclusion-Exclusion Principle.

Meaning find the number divisible by 3, find the number divisible by 5, and then subtract the number divisible by 3 AND 5, i.e. 15.
• Aug 7th 2007, 03:29 PM
Plato
$\left\lfloor {\frac{{999 - 99}}{3}} \right\rfloor + \left\lfloor {\frac{{999 - 99}}{4}} \right\rfloor - \left\lfloor {\frac{{999 - 99}}{{12}}} \right\rfloor = 450$

We substract the numbers divisible by 12 because we counted them twice.
• Aug 7th 2007, 03:45 PM
ff4930
NVM I got it.
Thank you all so much