There's a Wikipedia article about this problem: http://en.wikipedia.org/wiki/Coupon_collector%27s_problem
Suppose $k$ of the $N$ numbers have appeared so far. The probability that you get a new number on the next trial is then $(N-k)/N$. Let $X$ be the number of trials until that new number appears. Then $X$ is geoemtrically distributed on $\{1,2,3,\ldots\}$ and has expected value $N/(N-k)$ (e.g., if the probability of success on each trial is $1/15$ then the expected number of trials needed to get one success is $15$).
You're asking about the expected value of the sum of random variables like this one. The first has expected value $1$ (on the first trial, you necessarily get a new number). The second has expected value $N/(N-1)$. The third has expected value $N/(N-2)$. And so on. So the expected number of trials needed is
$$
1 + \frac{N}{N-1} + \frac{N}{N-2} + \frac{N}{N-3} + \cdots + \frac N3 + \frac N2 + \frac N1.
$$