Determine the required number of items and probability for selecting a sample of only unique items when you sample with replacement. You have $n$ unique items of which you will be randomly selecting $m < n$ elements from. Assume each selection is independent and follows a uniform distribution. You also sample with replacement so you can pick the same items multiple times.
You want to select $m$ unique items and would like to know the number of items $n$ required for the probability of only selecting unique items to be greater than $p$.
Let $P(i) = $ probability of selecting a unique item on the $i'th$ pick, where $1 \leq i \leq m$. Unique, here in terms of what you have selected thus far in picks $\{1,2,..., i-1\}.$
Approach:
First pick: You have $n$ items to choose from and so you're guaranteed to get a unique item on the first try. $P(1) = 1$.
Second pick: You have $n$ items to choose from but $n-1$ picks to not repeat what you picked on your first try. $P(2) = \frac{n-1}{n}$.
In general: $P(i) = \frac{n-(i-1)}{n}$
Let $P_m$ be the probability of selecting a $m$ unique items.
$$P_m = P(1) \times P(2) \times ... \times P(m) = \frac{n}{n} \times \frac{n-1}{n} \times ... \times \frac{n+1-m}{n} = \frac{n!}{n^m \left(n-m\right)! }$$
From $P_m$ you want to compute the number of items $n$ such that $P_m > p$, where $0 \leq p \leq 1$ and $m$ is known. Taking log of both sides you get ...
$$\frac{n!}{n^m \left(n-m\right)!} > p \implies \ln(n!) - m\ln(n) - \ln\left((n-m)!\right) > \ln(p)$$.
Substituting in for example $m = 10000$ and $p = 0.7$ and using an equation solver (Wolfram) I get $n = 79.5$ which can't be since $n$ must be larger than $m$.
Any hints on where my mistake might be?
 A: I'm not sure about the solver solution, but you can use stirling's approximation to solve. Please check the below:

\begin{align*}
\frac{n!}{n^m \left(n-m\right)!} &> p\\
\ln(n!) - m\ln(n) - \ln\left((n-m)!\right) &> \ln(p)
\end{align*}
By Stirlings approximation, $\ln(n!) = n\ln(n) - n + \mathcal O(\ln(n))$
\begin{align*}
\frac{n!}{n^m \left(n-m\right)!} &> p\\
n\ln(n) - n - m\ln(n) - ((n-m)\ln(n-m) - (n-m)) &> \ln(p)\\
(n-m)\ln(n)  - (n-m)\ln(n-m) -m &> \ln(p)\\
(n-m)\ln(\frac{n}{n-m})   -m &> \ln(p)\\
(n-m)\ln(1+\frac{m}{n-m})   -m &> \ln(p)\\
\end{align*}
We let $(n-m) = x$
\begin{align*}
(n-m)\ln(1+\frac{m}{n-m})   -m &> \ln(p)\\
x\ln(1+\frac{m}{x})    &> \ln(p)+m\\
\end{align*}
Let $m+\ln(p) = k$, and further let $\ln(1+\frac{m}{x}) \simeq \frac{m}{x}-\frac{m^2}{2x^2}$
\begin{align*}
x\left(\frac{m}{x}-\frac{m^2}{2x^2}\right)    &> k\\
\end{align*}
setting equality for solving,
\begin{align*}
x\left(\frac{m}{x}-\frac{m^2}{2x^2}\right)    &= k\\
m -\frac{m^2}{2x}&= k\\
m -k&= \frac{m^2}{2x}\\
x&= \frac{m^2}{2(m -k)}\\
x&= \frac{m^2}{2(m -(m+\ln(p)))}\\
x&= \frac{m^2}{2( -\ln(p))}\\
x&= \frac{m^2}{\ln\left(\frac{1}{p^2}\right)}\\
n-m&= \frac{m^2}{\ln\left(\frac{1}{p^2}\right)}\\
n&=m+ \frac{m^2}{\ln\left(\frac{1}{p^2}\right)}\\
\end{align*}
In your case,
$n=10000+ \frac{10000^2}{0.713349}\sim 1.40193662\times10^8$
