# How many 5 digit numbers are greater than 63900 and do not have digits 8 or 9?

How many 5 digit numbers are greater than $63900$ which none of the digits should be 8 or 9 ?

### Progress

Since the greatest number is $77,777$ and the smallest one is $64000$ so we've $13777$ between them, but we shouldn't count $[8,9]$ , $[80,99]$ , $[800,999]$, $[8000,9999]$. I don't know how to count how many times these numbers repeat in these $(13777+1)$ numbers.

• What have you done so far? What are you stuck on? – Eric Lippert Apr 27 '14 at 15:45
• Since the greatest number is 77,777 and the smallest one is 64000 so we've 13777 between them, but we shouldn't count {8,9} , [80,99] , [800,999] , [8000,9999] . I don't know how to count how many times these numbers repeat in these (13777+1) numbers – user3078441 Apr 27 '14 at 15:52
• If you have not yet read How To Solve It, go get it and read it; it will serve you well in the future. Polya says that if there's a problem you cannot solve then there is a simpler problem that you can solve: find it and solve it. Can you solve the simpler problem of how many numbers between 0 and 9999 have no 8 or 9? – Eric Lippert Apr 27 '14 at 15:59
• Here's a hint: Suppose you had a bag containing a large number of identical brass house numbers. You go through the bag and throw out all the 8's and 9's. How many ways are there of choosing four digits from that bag? – Eric Lippert Apr 27 '14 at 16:07
• It was my fault that I didn't write the appropriate description for this problem, my problem is not counting those numbers, since I reached the answer before which is (8^4+8^3*6*5). My problem was how to count how many times this unallowable numbers repeat in [64000, 77777] . – user3078441 Apr 27 '14 at 16:09

How many starting with $7$? (how many digits can be used for one of the other places?)
How many starting with $6X$? where $X\in \{4,5,6,7\}$