How many 2-digit numbers are there that contain at least one 2?

How many 2-digit numbers are there that contain at least no 2 at all?

How many 3-digit numbers are there that contain at least one 3?

How many 5-digit numbers are there that contain at least one 5?

Devise and use problem solving strategies to explore situations mathematically (be systematic, make a list).

This problem is about learning how to count without counting, because the possibilities are too numerous. To solve the problem, students will need to apply a systematic approach, logic and reasoning about our number system and its patterns, and algebra. In so doing they will discover more about number, and recognize the efficiency of using an algebraic approach.

### The Problem

- How many 2-digit numbers are there that contain at least one 2?
- How many 2-digit numbers are there that contain at least no 2 at all?
- How many 3-digit numbers are there that contain at least one 3?
- How many 5-digit numbers are there that contain at least one 5?

### Teaching sequence

- Introduce the problem by looking at a number, say 1676, and brainstorming all the "features" of the number. (Its even, divisible by 4, divisible by 6, 4 digits, a 6 in the ones place etc)
- Pose the first part of the problem for the students to solve.
- Check solutions and approaches used. For this part many may have listed possibilities. Ask if there is another way to have found the 18 solutions.
- Pose the rest of the problem for the students to solve in pairs.
- As the students work ask questions that focus on the rules of divisibility and the way they are "thinking" about the numbers.
- Ask the students to record their solutions for each of the parts to share with the rest of the class.
- Share solutions. Encourage the students to reflect on the approaches used by others. Which ones can they follow? Which do they think are more efficient than the approach they used?

#### Extension to the problem

How many r-digit even numbers are there?

### Solution

- The 2-digit numbers that contain 2 can be produced by listing them systematically. They are 12, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 42, 52, 62, 72, 82, 92. There are 18 of them.

Is there another way to do this though? After all, if we were asked to find the number of 7-digit numbers that contained 2, we would have to produce a very long list.

- What about the 2-digit numbers that contain no 2 at all? You might think of using a list to get started. We would have 10, 11, 13, 14, 15, 16, 17, 18, 19, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, … This is becoming a very long list and there is a pattern from here on that will stop us having to write all these numbers down.

There are 9 numbers that start with a 1; there are 9 numbers that start with a 3; there are …; there are 9 numbers that start with a 9. So we have 9 times 8 numbers altogether. The 8 comes from the fact that there are 8 numbers in the sequence 1, 3, 4, 5, …, 9. That means that there are 72 numbers that don’t have a 2 in them.

Consider: What have we found so far? There are 18 2-digit numbers that have a 2 and there are 72 2-digit numbers that don’t. 18 + 72 = 90. is that familiar? Surely there are 90 2-digit numbers altogether? So we were wasting our time when we started listing and then counting, the 2-digit numbers without a 2. Subtracting 18 from 90 is more straight-forward.

- With the 3-digit numbers we could make a list but it’s clearly going to be more difficult to be sure we haven’t missed anything. Consider: Would it be easier, for instance to count all 3-digit numbers that didn’t contain a 3? (There’s a hint from (b).)

First of all count

all3-digit numbers, then count all 3-digit numbers withnothrees, then subtract the second number from the first. First the 3-digit numbers: There are 9 possible digits for the first place (you can’t use 0), 10 for the second place (you can use anything from 0 to 9) and 10 for the third. That makes 9 x 10 x 10 = 900.For the 3-digit numbers with no threes: Their first (hundreds) digit can be chosen in just 8 ways (no 0 and no 3), their second digit in just 9 (no 3 remember), and their third digit in 9 ways. So there are 8 x 9 x 9 of these. That’s 648 altogether.

So the number of 3-digit numbers with at least one three is 900 - 648 = 252. (That would have been a long list!)

- Obviously the same can be done with the 5-digit numbers. So we get 9 x 10 x 10 x 10 x 10 – 8 x 9 x 9 x 9 x 9 = 90000 – 52488 = 37512. (This is a frighteningly long list. How long would it take to write this list down?)

#### Solution to the extension

We couldn’t possibly write down a list here. (Though if you are stuck at this point, then writing down the list for r = 2 and r = 3 might give you some inspiration.)

When is a number even? It is even if it ends in 0, 2, 4, 6, or 8. This means that we have a choice of 5 numbers for the last digit. Once again we have a choice of 9 for the first digit, then 10 for the next digit, then 10 for the next, … , and then 5 for the last digit. So we have to multiply together one 9, one 5 and r – 2 10s. This gives 5 x 9 x 10^{r-2}. That’s 45 with r – 2 zeros.