If $D=1$, which has probability $\frac 1k$, the chance a ticket is picked is $\frac 12$. If $D=2$, also probability $\frac 1k$, the chance a ticket is picked is $\frac 1{2^2}$ The total probability a ticket is picked is then $$\frac 1k\sum_{i=1}^k \frac 1{2^i}=\frac 1k\left(1-\frac 1{2^k}\right)$$