# Average # of tracks that must be heard on a CD, whose player's shuffle function can play the same song >1×, before all tracks of CD heard. [duplicate]

Suppose you have a CD of $n$ tracks. Your CD player's shuffle function is broken; it selects a random song, possibly even the one(s) already played, before all tracks are played. How many tracks (possibly duplicates), on average, does one need to listen to to hear every song at least once?

The solution to this problem is $n H(n)$ where $H(n)$ is the n$^\mathrm{th}$ harmonic number.

How is this derived?