# Problem 172: Investigating numbers with few repeated digits How many 18-digit numbers n (without leading zeros) are there such that no digit occurs more than three times in n?