Solution (source code)

= Solution

Use the <state space> $\{1,\ldots,N\}$, since an empty box is refilled immediately. The <probability> that formerly led from $i$ to $0$ now leads to $N$. Thus the <transition matrix> is
$$
\boxed{P_{ij}=\begin{cases}
1/i,&1\leq j<i,\\
1/i,&j=N,\\
0,&\text{otherwise}.
\end{cases}}
$$
For $i=N$, the second line includes the self-loop obtained when all stickers are taken. When $N=1$, this is simply the one-state <Markov chain>.