# Urn problems: find mean and variance - stuck

I am stuck in a problem, and I can't think of a next step to find the solution. The question is the following:

Suppose an urn has $$k$$ balls, numbered from $$1$$ to $$k$$, $$k \in \mathbb{N}$$. A sample of $$m$$ balls is withdrawn, $$m \in \mathbb{N}^ \ : \ 1\leq m < k$$ and the numbers of such sample are written down. Then the $$m$$ balls are returned to the urn and another sample is withdrawn, with $$m$$ balls again and registering the numbers. Let $$X_n$$ be the number of distinct numbers observed at least once in the first $$n$$ extractions, $$n \in \mathbb{N}$$. Find $$E(X_n)$$ and $$Var(X_n)$$. (Tip: $$X_1 = m$$)

Since the number of extractions will be at least $$m$$ and at most $$k$$, given that $$X_1 = m$$ I tried to evaluate $$P(X_n = j + m | X_1 =m)$$ for $$0\leq j \leq \min\{m, k-m \}$$. It turns out that $$X_2$$ have a hypergeometric distribution but I do not seem to find an answer trying to expand it for $$X_n$$ and I am really stuck.

I think it will be much easier to go about this if we consider the random variables $$Y_i,\ i=1,\dots,k$$ where $$Y_i$$ is $$1$$ if ball number $$i$$ is drawn at some time in the first $$n$$ draws and $$0$$ if it is not. Then $$X_n=\displaystyle{\sum_{i=1}^kY_i}$$ and it's easy to compute $$E(X_n)$$ by linearity of expectation. The variance is harder because the $$Y_i$$ aren't independent, but you can use the formula for the variance of the sum in terms of the covariance.