How many positive integers less than 10,000 have at most two different digits?
Solution
Count integers with exactly 1 digit type and those with exactly 2 digit types. 1-digit: 9. 2-digit: single digit pairs 9, mixed 81. Continue for 3,4 digit numbers. Total = 93.