There are two methods. I'll do both.
----------------------------------------
The largest 10 digit number that has the first three digits 407 is
4079999999
and that number is the the number of positive integers from 1 to 4079999999,
inclusively.
We wish to subtract from that the number of integers less than that number
which do not have 407 as its first three digits.
The largest 10-digit number that does not have its first three digits as 407 is
4069999999
and that is the number of positive integers from 1 to 4069999999, inclusively.
So we subtract the second number from the first number:
4079999999
-4069999999
-----------
10000000
------------------------------------
Or we could do it as an arithmetic sequence:
, ,
Then use the formula
Edwin