Date: Mon, 20 Sep 1999 07:22:02 -0600 (CST)
Name: Jessica
Who is asking: Student
Level: Elementary

Question: Is there a trick to finding out how many numbers containing the digit two is there from 1 to 1000? Please Explain.

Hi Jessica,

  1. Lets start with the largest group:
    All the two hundreds: that gives 100 numbers containing two.

  2. Now, in every OTHER group of 100, there are 10 other numbers for the twenties:
    10 x 9 (nine other hundreds groups).

  3. Finally, in every group of tens which you did NOT yet count, there is a number with last digit 2.
    I presume you can figure that out (by addition and substraction).
Finally you add the counts you made in 1, 2 and 3 since you already took care of any overlap.
   In a sense, as I write this I am imagining a long list of all the numbers (in my mind) and putting down marks by all the numbers with 2's in the hundreds, then the tens and finally the units. With this picture, I see that one set of 20 lies in the 200's, so I don't count these twice. Other sets of 2's lie within 20's of each hundred, so I am carefull not to count these twice.

 1  2  3  4  5   6  7  8  9  
101112131415 16171819
202122232425 26272829
303132333435 36373839
...... ....
...... ....
110111112113114115 116117118119
120121122123124125 126127128129
130131132133134135 136137138139
...... ....
...... ....
200201202203204205 206207208209
200211212213214215 216217218219
220221222223224225 226227228229
...... ....
...... ....
290291292293294295 296297298299
300301302303304305 306307308309
...... ....
...... ....

   There are fancy 'counting methods' which one can use (and loearn) in higher mathematics, checking out union and intersection with addition and substraction. However, our visual sorting works pretty well for patterns like you describe.

Walter Whiteley

Go to Math Central