There are possibilities for the first i samples; we assume these are all equally likely.

How many of the arrangements have a first duplication on sample number i? There are N ways to choose the ith sample. This element also appears exactly once in samples 1 through i-1, and disregarding order, there are possible choices for the other elements. Each set of elements in samples 1 through i-1 can be ordered in ways. So altogether, there are

possible sequences of samples which have a first match on the ith sample.

So the probability that a first match happens on sample number i is

,

and the expected number of samples required to achieve a match is

.