I apologize for not taking the time to work this out, but one way to solve this problem is to use a Markov chain. The states are the number of successes you have had so far, and the matrix is pretty simple. The only entries will be along the diagonal, so P[sub]i,i[/sub] = i/s, and to the right, where P[sub]i,i+1[/sub] = q = 1 - i/s (as long as i < s+1).
E.g. for s = 5
(I used '.' to mean 0 in the matrix for easier reading.)
0 1 2 3 4 5
0 . 1 . . . .
1 . 1/5 4/5 . . .
2 . . 2/5 3/5 . .
3 . . . 3/5 2/5 .
4 . . . . 4/5 1/5
5 . . . . . 1
If you’re not familiar with Markov matrices, this is how to read it: The row represents the current state; the column represents the future state. The entry at a row and column is the probability of going from that row’s state to that column’s state on the next trial.
So, if we’ve already thrown 2 distinct numbers (2 ‘successes’ as it were), the probability on the next throw that we’ll go to 0 or 1 is of course 0 (can’t go down), it’s 2/5 that we stay at 2 (rolling the same number), and 3/5 that we get a new number (go to state 3). We can’t get more than 1 new number so the probability of getting 4 or 5 after 2 is 0.
Note that in the Markov matrix, all the values in a row add up to 1.
So what do we do with this to get an answer? All you need to do to get the results after any number of trials is raise the matrix to the number of trials, in other words multiply it by itself r times. (The sequence of matrices is what’s actually called the Markov chain.)
The values in the matrix will tell you the probability of going from any initial state (along the row) to a future state after r trials. So for what you’d want, you’d multiply the matrix by itself r times, then look at the upper right corner (row 0, col s+1), which is the probability of having s distinct numbers after r turns if you start from 0.
Now this is probably the easiest approach from a computational standpoint (assuming you’ve got some matrix math software), but there might be a way to derive a formula doing it algebraically. Unfortunately I don’t have time to do it right now.