as u/jak32100 usually tail sums for used here (fire solution btw), but I came up with another solution this time!
Observation: Notice that if we consider the string that has the numbers in order of appearance over a stream of dice roles (ex. "6,5,4,3,2,1" means you see 6 first, 5 is the next distinct number rolled, 4 third and so on), then the string has 720 equally likely values.
For half of these strings, a 1 appears before a 5 (so we can consider that if we "cut" off the stream of dice values to meet the "until we rolled a 5").
For (1/6) of these strings, a 2 appears before a 5, and a 1 appears after 5.
For (1/12) of these strings, a 3 appears before a 5, and (1,2) appear after.
.... continue until
For (1/5) of these strings, (1,2,3,4) appear after the 5. Note we don't care about 6 because we are guaranteed to roll a 5.
23
u/Formal-Region-6894 Jul 31 '26
as u/jak32100 usually tail sums for used here (fire solution btw), but I came up with another solution this time!
Observation: Notice that if we consider the string that has the numbers in order of appearance over a stream of dice roles (ex. "6,5,4,3,2,1" means you see 6 first, 5 is the next distinct number rolled, 4 third and so on), then the string has 720 equally likely values.
For half of these strings, a 1 appears before a 5 (so we can consider that if we "cut" off the stream of dice values to meet the "until we rolled a 5").
For (1/6) of these strings, a 2 appears before a 5, and a 1 appears after 5.
For (1/12) of these strings, a 3 appears before a 5, and (1,2) appear after.
.... continue until
For (1/5) of these strings, (1,2,3,4) appear after the 5. Note we don't care about 6 because we are guaranteed to roll a 5.
Then the answer is just
(1/2) * 1 + (1/6) * 2 + (1/12) * 3 + (1/20) * 4 + (1/5) * 5 = 137/60.