I can only remember a seven-digit telephone number if the first three digits (the "prefix") are equal to the next three digits or the last three digits. For example, I can remember 389-3892 and 274-9274.
How many seven-digit telephone numbers can I remember?
(For this problem, a telephone number cannot start with a 0.)