II.6 No multiple of 9 and no 9 in any digit

(1) Find the number of an integer more than or equal to 1 and less than or equal to 999 which are not a multiple of 9 and do not contain 9 in the number of each digit.

(2) For the integer applicable to (1), find the 999th number counting from the least one in all integers.












Answer
(1) 648 pieces
(2) 1477

Solution
(1) The number suitable for conditions is counted sequentially from 1.

In 1, 2, 3, 4, 5, 6, 7, 8, 9, there are eight other than 9.

In 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, there are eight other than 18 and 19.

In 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, there are eight other than 27 and 29.

In 30 - 39, there are eight other than 36 and 39.

In 40 - 49, 50 - 59, 60 - 69, 70 - 79, 80 - 89, there are also eight pieces respectively.

In 90 - 99, there is zero.

It turns out that there are in total 8 pieces x 9 = 72 pieces from 1 to 99.

As for 100 - 199, since it is necessary to investigate ones digit and tens digit only, there are also 72 pieces as well as in 1 - 99.

Since 200 - 899 is similarly completely considered, it will be 72 pieces × 9= 648 pieces in 1 - 899. 

There is no integer suitable for the condition in 900 - 999. 

The number to be found is 648 pieces.

(2) Select numbers suitable for the condition sequentially in the same way as (1), there are 72 pieces in 1000 - 1099. 

There are 72 in 1100 - 1199, 1200 - 1299, 1300 - 1399.

It becomes 72 x 13 = 936 in 1-1399 in total. The remainder is 999-936 = 63.

It becomes eight in 1410-1419 and in 1400-1409 ---------.

According to the calculation of 63 / 8 = 7 remainder 7, the seventh number from 1470 is 1477 (1470, 1471, 1472, 1473, 1474, 1475, 1477). 

The 999th number to find is 1477.