I interpret the problem as rolling an 8 sided die 3 or 5 times and a success is there being at least a 1, 2, and 3 in the roll string.
OP got the correct answer for rolling 3 times.
Rolling 5 times is actually much more complicated.
We have to consider 5 cases of successful rolls
i) there are 3 of 1, 2, or 3
ii) there are 2 each of 2 of 1, 2, or 3
iii) there are 2 of 1 of 1, 2, or 3, and 1 of 4-8
iv) there are 1 each of 1, 2, and 3, and there are 2 of 1 of 4-8
v) 5 different numbers with 1,2, and 3 included
I'll state how many of each occur. I leave it to you to work through these and digest them.
i) \(\displaystyle \dbinom{3}{1}\dbinom{5}{3}2!\)
ii) \(\displaystyle \dbinom{3}{2}\dbinom{5}{2}\dbinom{3}{2}\)
iii) \(\displaystyle \dbinom{3}{1}\dbinom{5}{1}\dbinom{5}{2}3!\)
iv) \(\displaystyle \dbinom{5}{1}\dbinom{5}{2}3!\)
v) \(\displaystyle \dbinom{5}{2}5!\)
Summing these yields an overall probability of getting a roll string containing 1, 2, and 3 as
\(\displaystyle p = \dfrac{1275}{16384}\)
I guess I can explain a bit of this reasoning.
i)
pick 1,2, or 3 as the triple number. That's the \(\displaystyle \dbinom{3}{1}\)
now place those 3 numbers. That's the \(\displaystyle \dbinom{5}{3}\)
The remaining two numbers have 2! permutations.
ii)
pick the 2 digits of 1,2,3 that will be doubled. \(\displaystyle \dbinom{3}{2}\)
place the first 2 doubled digits. \(\displaystyle \dbinom{5}{2}\)
place the next 2. \(\displaystyle \dbinom{3}{2}\)
the final digit takes the remaining slot
iii)
pick the 1 digit of 1,2,3 that will be doubled. \(\displaystyle \dbinom{3}{1}\)
pick the 1 digit of 4-8. \(\displaystyle \dbinom{5}{1}\)
place the doubled digits. \(\displaystyle \dbinom{5}{2}\)
the remaining 3 numbers have 3! permutations
iv)
pick the digit from 4-8 that will be doubled. \(\displaystyle \dbinom{5}{1}\)
place the doubled digits. \(\displaystyle \dbinom{5}{2}\)
the remaining digits, 1,2,3, have 3! permutations
v)
pick the 2 digits from 4-8. \(\displaystyle \dbinom{5}{2}\)
the 5 unique digits have 5! permutations
As you see I look at things a bit differently from Jomo but both are equivalent.
Actually I kinda like the way he does it.