Introduction
When I try to log into my university’s SSO system, it gives me a two-digit verification code that I must select on my cellphone. For instance, in the images below, the website (on the left) shows the number 25, and I would tap 25 on my phone (on the right). Now, I’m curious about how many attempts I would need to make to see all possible 100 codes.

Problem Statement
Let be a finite set of size . At the beginning, a set is initialized to be an empty set. For each step, a random element is chosen at uniformly random from and put to , i.e., . Then, what is the expected number of steps to reach ?
Now, take your time to solve this problem! (Hint: it is easy.)
Solution
Solution 1
For fixed , suppose there are elements should be chosen to reach . In other words, . Now, let be the expected number of additional steps at the moment. We let .
Then, we have probability of getting a new fresh number and probability of getting a number that has been chosen before. Thus, noticing that we need this one step to choose an element, we have the following recursive formula:
Rearranging, we get
Equation directly gives
where is the -th harmonic number.
In particular, we have . (In fact, this solution needs more verification that each exists but I omit.)
Solution 2
For fixed , let be a random variable for the number of steps until the next element which has not been chosen before when there are elements not chosen. Then, we immediately get . Then, , the random variable for the number of steps to reach equals ; by linearity, we get
Conclusion
Hence, as , I shall expect about 519 log-in tries to observe all 100 numbers.