Here is my thought process so far:
There are 10 options for the first number, 9 for the second, and 8 for the third. According to this current structure, the fourth and fifth digits would have to be one or two of the three already selected digits in some order. If the first three digits were 1, 2, 3, then the possible permutations for the fourth and fifth spots are: 11, 22, 33, 12, 21, 13, 31, 23, and 32.
So the answer so far would be (10 x 9 x 8) x (9)
Therefore: Per three distinct digits, there are already 9 options for a string. Additionally, the fourth and fifth spots which contain 1 or more of the distinct digits for the first repeated occurrence don't have to be at the end. I thought that I should multiply the present answer by (5 choose 3) = 10 to account for this additional variation in order, but I can tell that there must be some number of strings which are counted twice by this method, so
(10 x 9 x 8) x (9) x (10) = 64800 is probably too great. Any suggestions? Thank you