How many whole numbers between 1 and 1000 do not contain the digit 1

Your direct approach looks good, and may well be the easiest approach for this particular problem. The alternative approach, which generalizes better and is used below is Inclusion-Exclusion.

Show

See this article for an introduction to Inclusion-Exclusion. Then, see this answer for an explanation of and justification for the Inclusion-Exclusion formula.

It is harmless to zero fill the numbers, since neither of the digits being interrogated, $(1)$'s and $(4)$'s are $(0)$'s. Further, you can harmlessly include the number $(0000)$, as the first number under investigation. Therefore, you are examining all $[(10)^4]$ 4 digit numbers.

Let $S$ denote the enumeration of all $(1)$'s, among the 4 digit numbers, where the prohibition against the digit $(4)$ is ignored. Clearly, enumerating column my column, since each column will have exactly $(1/10)$ of its digits be a $(1)$, the enumeration here is

$$T_0 = \frac{4 \times [(10)^4]}{10} = 4000. \tag1 $$

For $k \in \{1,2,3,4\}$ let $S_k$ denote the portion of the $4000$ occurrences of the digit $(1)$ that occur when the $4$ digit number has a $(4)$ in the $k$-th digit place, reading from left to right.

Then, the desired enumeration will be

$$T_0 - ~\text{the corresponding enumeration from} ~|S_1 \cup S_2 \cup S_3 \cup S_4|.$$

For $r \in \{1,2,3,4\}$ let $T_r$ denote the enumeration of the $(1)$'s in the $~\displaystyle \binom{4}{r}$ terms represented by the summation of

$$\sum_{1 \leq i_1 < \cdots < i_r \leq 4} |S_{i_1} \cap \cdots \cap S_{i_r}|.$$

Then, in accordance with Inclusion-Exclusion, the desired enumeration will be

$$\sum_{r=0}^4 (-1)^r T_r.$$


Actually, I haven't worded the above definitions very well. However, the details below will clarify my intent. Further, there will be many considerations of symmetry which will simplify the computations.

Under the assumption that the leftmost digit is $(4)$, with the other $(3)$ digits unconstrained, it is clear that there will be $1000$ numbers under consideration. At random, within these $(1000)$ numbers, the probability of a $(1)$ in each of the other $(3)$ columns is $(1/10)$.

So, focusing only on the $(1000)$ numbers that have a $(4)$ in the leftmost digit (i.e. focusing on the set $S_1$), the number of occurrences of a $(1)$ in one of the other $(3)$ digits will be

$$3 \times \frac{1000}{10} = 300.$$

Further, by considerations of symmetry, you have the same enumeration for $S_2, S_3,$ and $S_4$. Therefore,

$$T_1 = 1200.$$


For $S_1 \cap S_2$, you have $2$ columns unconstrained, the 3rd and the 4th column, reading left to right. Further, the same symmetry considerations prevail.

Examining (in effect) only $S_1 \cap S_2$, you are examining $(100)$ numbers. In these $(100)$ numbers, the number of occurrences of a $(1)$ in the 3rd digit, combined with the number of occurrences of a $(1)$ in the 4th digit will be

$$2 \times \frac{100}{10} = 20.$$

With the same considerations of symmetry in the computation of $T_2$ as was present in the computation of $T_1$, you have that

How many whole numbers between 1 and 1000 do not contain the digit 1

Determine the number of integers between 1 and 1000 that contain at least one 2 but no 3.This is a pretty complicated counting problem. We want to count numbers like 245 and 622, because they have 2's as digits, but we don't want 532 or 392 because they have 3's in addition to their 2's.You might try a simpler version of this first (like integers between 1 and 100), or variations (which numbers have 2's, but forget about the 3's, or without 3's and forget about the 2's).What pattern shall we look for? Let's try doing the problem for numbers between 1 and 10, then between 1 and 100.There are 10 numbers between 1 and 10. Only one of them contains a 2 (namely, 2 itself), and there's no 3 here.There are 100 numbers between 1 and 100 - Let's list all of the ones that have a digit "2" -- 2, 12, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 42, 52, 62, 72, 82, 92. There are 19 numbers here, but two of them have "3"s. So there are 17 numbers between 1 and 100 that contain at least one 2 but no 3.Let's think about how to do this without writing all the numbers down. We certainly don't want to have to do that for 1 to 1000!How many numbers between 1 and 100 have no 3 in them? If we're not allowing any 3's then there are 9 ways to pick the tens digit and 9 ways to pick the ones digit (we're allowing numbers like 03 for 3 etc). So there are 81 numbers between 1 and 100 with no 3's.Next, let's figure out how many of these have at least one 2. Actually, it's easier to do the opposite -- to figure out how many of the 81 numbers with no 3's have no 2's either. Then we can subtract this number from 81 to get the number of numbers with no 3's that have at least one 2.So, how many numbers between 1 and 100 have no 2's and no 3's? Now there are 8 ways to pick the tens digit and 8 ways to pick the ones digit, which gives us 64. So we're not interested in 64 of the 81 numbers with no 3's -- this leaves 17 that have at least one 2 but no 3's, just as we calculated above. Notice, this is 92 - 82.Now we're ready to tackle the numbers from 1 to 1000.How many numbers from 1 to 1000 have at least no 3's in them? Just as for the 1 to 100 case, we have 9 ways to pick the hundreds digit, 9 ways to pick the tens digit and 9 ways to pick the ones digit. This makes 93 = 729 numbers with no 3s.Now we want to "throw away" the ones that don't have any 2's either. Again as before, there are 8x8x8 of these (since there are now 8 ways to pick the hundreds digit, 8 to pick the tens and 8 to pick the ones).So we're left with 93 - 83 = 729-512 = 217 numbers with at least one 2 but no 3's.You might want to try numbers from 1 to 10,000 next.

How many whole numbers are there in 1 to 1000?

Hence, their are 1001 whole numbers up to 1000.

How many whole numbers between 1 and 100 contain the digit 9?

There are total 20 nines between 1–100.

What is the whole number of 1000?

One thousand is shown as 1,000. You would have to count one thousand whole numbers starting from zero and ending with one thousand, just like you would count ten whole numbers to count from zero to ten. A whole number is any number that is not a fraction or decimal.

How many integers between 0 and 1000000 contain the digit 9?

what i did is, since its from 0 to 1,000,000 i can simply say its to 999,999 and for 6 digits there are 8 choices of numbers, so 68. now subtract that from 1,000,000 and we get 679,616 as the numbers that contain the digit 9, is that correct?