A die is rolled $5$ times. How many outcomes will result in $5$ different numbers? How many outcomes will have the $5$th number equal to an earlier number?
For the first part I did:
$$6 \times 5 \times 4 \times 3 \times 2 \times 1$$
so that we have $5$ different numbers.
For the second part, I did:
$$6 \times 5 \times 4 \times 3 \times 2 \times 4$$
where the last $4$ repeats one of the $4$ previous values.
Is this right?
The numeric answer in the first is correct, but if you are rolling $5$ times the $\times 1$ should not be there.
For the second, you certainly should not have the $\times 2$ in there. Your answer would be correct if the question were how many ways to get four different numbers in the first four rolls, then match one of those four on the fifth roll. I do not see the requirement for the first four to be distinct, so would think we should be counting $12332, 12333,$ and $11111$ as successes as well. You need to add the number of ways to get three different numbers on the first four rolls times three and similarly for two and one.
You can condition on the number of different numbers in the first four rolls. There are $6 \times 5 \times 4 \times 3 \times 4$ ways to get four different numbers, then match one on the fifth roll. There are ${4 \choose 2}\times 6 \times 5 \times 4 \times 3$ ways to get two numbers the same out of the first four, then match one of the first three with the fifth roll. There are ${4 \choose 3} \times 6 \times 5 \times 2$ ways to get three of the same in the first four rolls and match a number with the fifth. There are $\frac 12 {4 \choose 2}\times 6 \times 5 \times 2$ ways to get two pair and match one. Finally there are $6$ ways to get five of the same. If I punch the calculator right, I get $4026$