**Q: How many positive integers less than 1000 are:
(a) divisible by 7?
(b) divisible by 7 but not by 11?
(c) divisible by either 7 or 11?
(d) divisible by exactly one of 7 or 11?
(e) divisible neither by 7 or 11?
(f) have distinct digits?
(g) Have distinct digits and are even?**

A: This is quite the question. Good thing I love math and good thing I love to count. Let’s start:

(a) **How many numbers (less than 1000) are divisible by 7?** Well (use 999 since we have to be less than, but not equal to 1000), 999/7 = 142.71… Therefore, there are 142 numbers less than 1000 that are divisible by 7.

(b) **Divisible by 7 but not by 11**… Hmm, this is a little trickier. Well, we know there are 142 numbers divisible by 7 (that are less than 1000, which I will stop repeating since we can assume that for this entire problem). So, how many of those numbers are also divisible by 11 that we need to throw out?

What is the smallest number divisible by 11 and 7? 77…. So, how many numbers less than 1000 are divisible by 77? 999/77 = 12.97. Therefore, there are 12 numbers that are divisible by both 7 & 11. There are 142 only divisible by 7.

So, 142 – 12 = 130 numbers that are divisible by 7 but not divisible by 11.

(c) **Divisible by either 7 or 11**? This is trickier yet. In counting, we must be very careful not to “overcount” (count the same option twice). We wouldn’t want to look at the number 77 and say that it counts as 2 choices since it is both divisible by 7 and 11… That wouldn’t make sense…

So, what we do is the following (an old probability / countring trick):

(# divisible by 7) + (# divisible by 11) – (# divisible by both 7 and 11)

How many numbers are divisible by 11? 999/11 = 90.81… So, 90 numbers below 1000 are divisible by 11.

Therefore:

142 + 90 – 12 = 220

There are 220 numbers (<1000) divisible by either 7 or 11.

(d) **Divisible by exactly one of 7 or 11?**

Follow me on this logic… From above, we know there are 220 numbers divisible by either 7 or 11 (and possibly divisible by both)… But now, we want to take out all the options that are both divisible by both 7 and 11. We know that this is 12 options.

So, 220 – 12 = 208. There are 208 numbers divisible by either 7 or 11 but not both.

(f) **Divisible by neither 7 or 11?**

There are 999 total numbers that are less than 1000 (1-999)? So, we know that there are 220 numbers that are divisible by either 7 or 11. Therefore, ever other number must be neither divisible by 7 or 11…

999 – 220 = 779

There are 779 numbers less than 1000 that are neither divisible by 7 or 11.

(f) OK… New questions… How many numbers less than 1000 have distinct digits? We are talking about either 1-digit numbers, 2-digit numbers or 3-digit numbers. We will handle them all separately:

**3-digit-numbers**: _ _ _

How many choices for the first digit? The first digit can be 1-9 (9 choices). The first digit cannot be 0 because that would make it a 2-digit number, right?

9 _ _

How many choices for the second digit? It can be 0-9 (10 choices)… But, it cannot be the same that was chosen in slot 1. Therefore, there are only 9 choices:

9 9 _

How many choices for the third and final digit? It can be 0-9 again (10 choices), but must be different from the 1st and 2nd choice: only 8 choices left:

9 9 8

There are 9*9*8 = 648 3-digit numbers with distinct digits.

**2-digit numbers:** _ _

1st slot: 9 total choices (1-9)

2nd slot: 9 total choices (0-9) but cannot match the first

9*9 = 81 2-digit numbers with distinct digits

**1-digit numbers: **There are 9 positive 1-digit numbers (1-9) and they are all distinct.

So, there are 648 + 81 + 9 = 738 total numbers <1000 with distinct digits.

**(g) Have distinct digits and are even? This is my third attempt at this problem. Another reader has kindly pointed out some errors I have made… He was indeed correct. Just goes to show you: don’t do counting problems hastily… even those who “know what they’re doing” can make mistakes!
**

We are going to break this problem down case-by-case:

There are nine 1-digit numbers and 4 of them are even.

Now think about 2-digit numbers:

- If the first digit is odd, that means there are 5 even endings that can be paired with it. So, for the teens, thirties, fifties, seventies, nineties, we have 5*5 = 25 even numbers
- If the first digit is even, that means that there are only 4 even endings that can be paired with it (because 4 cannot be paired with 4 to make 44… Only 40, 42, 46, 48). So, for the twenties, forties, sixties, eighties, we have 4*4 = 16 even numbers

Think about 3-digit numbers:

- First digit odd (1, 3, 5, 7, 9), second digit odd (1, 3, 5, 7, 9 but not matching the first), last digit even (0, 2, 4, 6, 8): 5*4*5 = 100 evens

- First digit odd, second digit even, last digit even (but not matching the second digit): 5*5*4 = 100 evens
- First digit even, second digit odd, last digit even (but not matching the first digit): 4*5*4 = 80 evens

- First digit even, second digit even, last digit even (none of the digits matching): 4*4*3 = 48 evens

Now, add up all the red: 4 + 25 + 16 + 100 + 100 + 80 + 48 = 373 even numbers with all distinct digits…

Counting is hard! It is easy to over-count or over-look something. I already caught a small error right before I published this. Look this over and apply your own logic. If you think I missed something, let me know!

LikeLike

In part (g), the exclusion of 0 as a leading digit breaks the symmetry. For example, there are 9 positive one-digit numbers, and 5 of them are odd, which is more than half. You may have to consider subcases based on whether the leading digit is odd or even.

LikeLike

Centurymath, You are very right. I completed part (g) before fixing my error and never returned to edit/fix (g).

Let me re-think (g) and then fix it.

LikeLike

PLEASE NOTE: This post has been edited and updated. There was initially an error that was found by centurymath (see comment 2)… The error has been removed and the post should now be error-free (hopefully)!

LikeLike

Hmm. My answer for part (g) is 373. I got this by hand, and wrote a computer program to check.

LikeLike

WHERE is my brain today?!?! Yikes! Two logic errors on the same problem… Today is not my day for counting…. Please stay tuned… This post is getting changed and corrected!

LikeLike

OK. I have revised part (g) for the 3rd time. I currently believe it to be correct but am not going to swear on it because I need to give it more though (I obviously erred two times before). Please read it and let me know your thoughts.

LikeLike

Almost. There are only 4 even digits that a number can start with, since 0 is excluded. If you make this change then it is correct.

LikeLike

Yes. Just left the house and realized that. Trying to edit from an iPhone and not working

LikeLike

i truly appreciate the help stacey.. thanks very much for helping me understand this,

also want to thank century math for his added help,

LikeLike

Yes, thank you centurymath for getting me in-line!

Lessons should be learned for everyone:

Never take what I say as gospel, even if it is convincing 🙂 (don’t tell my husband I said this)

Don’t rush through problems just — you might make mistakes 3-4 times! Yikes.

LikeLike

I usually don’t post on Blogs but ya forced me to, great info.. excellent! … I’ll add a backlink and bookmark your site.

LikeLike

(g) Suppose our integers: abc, a # b #c (0 < a < 10; 0 ≤ b < 10; c = 0, 2, 4, 6, 8; a, b, c are intergers)

Case 1: c = 0

• 1 way to choose c

• 9 ways to choose a

• 8 ways to choose b

We have 8.9.1 = 72 distinct digits and are even.

Case 2: c # 0

• 4 ways to chose c

• 8 ways to chose a

• 8 ways to cho b

We have 4.8.8 = 256 distinct digits and are even.

Total = 256 + 72 = 328 distinct digits and are even.

LikeLike

it teches all of world goo couting method it is wonderful method i aperciate you!!

LikeLike