I have $x$ songs and I want to listen to $y$ songs (no need to be different), but I can only listen to the same song if the other $u$ songs have been played already. How many playlists can I have?
2026-04-06 21:00:17.1775509217
Combinatorics Question on picking songs for playlists.
88 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
The first $u+1$ songs cannot have any repetitions, so they can be chosen in $\frac{x!}{(x-u-1)!}$ ways. After that you may pick any song except the $u$ most recently played songs, so you always have $x-u$ choices for the next song, thus the remainder of the playlist can be created in $(x-u)^{y-u-1}$ ways. The total number of playlists is the product of these two numbers.