PUMaC 2016 Combinatrics B Problem 7

Let a_{1}, a_{2}, a_{3}, \ldots be an infinite sequence where for all positive integers i, a_{i} is chosen to be a random positive integer between 1 and 2016, inclusive. Let S be the set of all positive integers k such that for all positive integers j<k, a_{j} \neq a_{k}. (So 1 \in S ; 2 \in S if and only if a_{1} \neq a_{2}; 3 \in S if and only if a_{1} \neq a_{3} and a_{2} \neq a_{3}; and so on.) In simplest form, let \frac{p}{q} be the expected number of positive integers m such that m and m+1 are in S. Compute p q.