The post at the following MSE link
2720594 treats the
same problem using $n$ coupons where $n'$ have already been seen and
coupons have to be collected in two instances. With the present
scenario we only have to see them once.
Using the notation from this MSE link
2426510 we have
from first principles that
$$\mathrm{P}[T = m] = \frac{1}{n^m}\times {n-n'\choose 1}\times
(m-1)! [z^{m-1}] \exp(n'z)
\left(\exp(z) - 1\right)^{n-n'-1}.$$
We shall see that with this closed form for the probabilities, we can
not only compute the expectation of the number of draws to collect the
remaining coupons but also the second factorial moment if desired, and
the variance. To start verify that this is a
probability distribution. We get
$$(n-n') \sum_{m\ge n-n'} \frac{1}{n^m}\times
(m-1)! [z^{m-1}] \exp(n'z)
\left(\exp(z) - 1\right)^{n-n'-1}
\\ = (n-n') \sum_{m\ge n-n'} \frac{1}{n^m}
(m-1)! [z^{m-1}] \exp(n'z)
\\ \times
\sum_{q=0}^{n-n'-1} {n-n'-1\choose q} (-1)^{n-n'-1-q} \exp(qz)
\\ = (n-n') \sum_{m\ge n-n'} \frac{1}{n^m}
\sum_{q=0}^{n-n'-1} {n-n'-1\choose q} (-1)^{n-n'-1-q}
(n'+q)^{m-1}
\\ = \frac{n-n'}{n}
\sum_{q=0}^{n-n'-1} {n-n'-1\choose q} (-1)^{n-n'-1-q}
\sum_{m\ge n-n'} \frac{1}{n^{m-1}} (n'+q)^{m-1}
\\ = \frac{n-n'}{n}
\sum_{q=0}^{n-n'-1} {n-n'-1\choose q} (-1)^{n-n'-1-q}
\frac{(n'+q)^{n-n'-1}/n^{n-n'-1}}
{1-(n'+q)/n}
\\ = \frac{n-n'}{n^{n-n'-1}}
\sum_{q=0}^{n-n'-1} {n-n'-1\choose n-n'-1-q} (-1)^{n-n'-1-q}
\frac{(n'+q)^{n-n'-1}}{n-n'-q}
\\ = \frac{1}{n^{n-n'-1}}
\sum_{q=0}^{n-n'-1} {n-n'\choose n-n'-q} (-1)^{n-n'-1-q}
(n'+q)^{n-n'-1}
\\ = - \frac{1}{n^{n-n'-1}}
\sum_{q=0}^{n-n'-1} {n-n'\choose q} (-1)^{n-n'-q}
(n'+q)^{n-n'-1}
\\ = 1 - \frac{1}{n^{n-n'-1}}
\sum_{q=0}^{n-n'} {n-n'\choose q} (-1)^{n-n'-q}
(n'+q)^{n-n'-1}
\\ = 1 - (n-n'-1)! [z^{n-n'-1}] \frac{\exp(n'z)}{n^{n-n'-1}}
\sum_{q=0}^{n-n'} {n-n'\choose q} (-1)^{n-n'-q} \exp(qz)
\\ = 1 - (n-n'-1)! [z^{n-n'-1}] \frac{\exp(n'z)}{n^{n-n'-1}}
(\exp(z)-1)^{n-n'}.$$
Note however that $\exp(z)-1=z+\cdots$ and hence $(\exp(z)-1)^{n-n'} =
z^{n-n'}+\cdots$ which means the coefficient extractor $[z^{n-n'-1}]$
is zero and we are left with just the first term, which is one, and we
indeed have a probability distribution.
Continuing with the expectation we evidently require
$$\sum_{m\ge n-n'} \frac{m}{n^{m-1}} (n'+q)^{m-1}
\\ = \frac{(n'+q)^{n-n'-1}}{n^{n-n'-1}}
\sum_{m\ge 1} \frac{m+n-n'-1}{n^{m-1}} (n'+q)^{m-1}.$$
The simple component from this is
$$(n-n'-1) \frac{(n'+q)^{n-n'-1}}{n^{n-n'-1}}
\frac{1}{1-(n'+q)/n}.$$
Here we recognize a term that we have already evaluated which yields
on substitution into the outer sum the value $n-n'-1.$ Evaluating
the second term we get for the expectation
$$n-n'-1
- \frac{1}{n^{n-n'-1}}
\sum_{q=0}^{n-n'-1} {n-n'\choose q} (-1)^{n-n'-q}
\frac{(n'+q)^{n-n'-1}}{1-(n'+q)/n}$$
or
$$\bbox[5px,border:2px solid #00A000]{
\mathrm{E}[T] = n-n'-1
- \frac{1}{n^{n-n'-2}}
\sum_{q=0}^{n-n'-1} {n-n'\choose q} (-1)^{n-n'-q}
\frac{(n'+q)^{n-n'-1}}{n-n'-q}.}$$
Introducing
$$f(z) = \frac{(n-n')!}{n-n'-z} (n'+z)^{n-n'-1}
\prod_{p=0}^{n-n'} \frac{1}{z-p}$$
we observe that for $0\le q\le n-n'-1$
$$\mathrm{Res}_{z=q} f(z)
= \frac{(n-n')!}{n-n'-q} (n'+q)^{n-n'-1}
\prod_{p=0}^{q-1} \frac{1}{q-p}
\prod_{p=q+1}^{n-n'} \frac{1}{q-p}
\\ = \frac{(n-n')!}{n-n'-q} (n'+q)^{n-n'-1}
\frac{1}{q!} \frac{(-1)^{n-n'-q}}{(n-n'-q)!}$$
so that the expectation becomes
$$n-n'-1 - \frac{1}{n^{n-n'-2}}
\sum_{q=0}^{n-n'-1} \mathrm{Res}_{z=q} f(z).$$
Now residues sum to zero and the residue at infinity is zero as well
since $\lim_{R\rightarrow\infty} 2\pi R \times R^{n-n'-1}/R/R^{n-n'+1}
= 0.$ So the sum is minus the residue at $z=n-n':$
$$\mathrm{Res}_{z=n-n'} \frac{(n-n')!}{z-(n-n')} (n'+z)^{n-n'-1}
\prod_{p=0}^{n-n'} \frac{1}{z-p}.$$
This needs
$$(n-n')! \left. \left( (n'+z)^{n-n'-1}
\prod_{p=0}^{n-n'-1} \frac{1}{z-p}
\right)' \right|_{z=n-n'}$$
Note that when we are waiting for one last coupon i.e. $n=n'+1$ the
sum formula yields for the expectation $0 - n \times (-1) = n$ so we
may suppose that $n\gt n'+1.$ Continue with the derivative to get
$$(n-n')! \left. (n-n'-1) (n'+z)^{n-n'-2}
\prod_{p=0}^{n-n'-1} \frac{1}{z-p} \right|_{z=n-n'}
\\- (n-n')! \left. (n'+z)^{n-n'-1}
\prod_{p=0}^{n-n'-1} \frac{1}{z-p}
\sum_{p=0}^{n-n'-1} \frac{1}{z-p}
\right|_{z=n-n'}
\\ = (n-n'-1) n^{n-n'-2} - n^{n-n'-1} H_{n-n'}.$$
Replacing this in the main formula yields the closed form (which also
produces the correct value for $n-n' = 1$ BTW)
$$\bbox[5px,border:2px solid #00A000]{
\mathrm{E}[T] = n \times H_{n-n'} \quad \sim \quad n \log (n-n')
+ \gamma n + \frac{1}{2} \frac{n}{n-n'}
- \frac{1}{12} \frac{n}{(n-n')^2} +\cdots.}$$
We thus obtain for forty coupons with thirty already seen the
expectation
$$\frac{7381}{63} \approx 117.1587302.$$
Moving on to conclude with the variance we now work with
$$\sum_{m\ge n-n'} \frac{m^2}{n^{m-1}} (n'+q)^{m-1}
\\ = \frac{(n'+q)^{n-n'-1}}{n^{n-n'-1}}
\sum_{m\ge 1} \frac{(m+n-n'-1)^2}{n^{m-1}} (n'+q)^{m-1}.$$
Here we recognize two easy pieces which are
$$(n-n'-1)^2$$
and
$$2 (n-n'-1) (n H_{n-n'} - (n-n'-1)).$$
With $\sum_{m\ge 1} m^2 w^{m-1} = (1+w)/(1-w)^3$ we have two
additional sum terms:
$$- \frac{1}{n^{n-n'-3}}
\sum_{q=0}^{n-n'-1} {n-n'\choose q} (-1)^{n-n'-q}
\frac{(n'+q)^{n-n'-1}}{(n-n'-q)^2}$$
and
$$- \frac{1}{n^{n-n'-2}}
\sum_{q=0}^{n-n'-1} {n-n'\choose q} (-1)^{n-n'-q}
\frac{(n'+q)^{n-n'}}{(n-n'-q)^2}.$$
For the first of these we use $f(z)/(n-n'-z)$ and obtain five pieces:
$$(n-n'-1)(n-n'-2) n^{n-n'-3} - 2(n-n'-1) n^{n-n'-2} H_{n-n'}
\\ + n^{n-n'-1} H_{n-n'}^2
+ n^{n-n'-1} H^{(2)}_{n-n'}.$$
The second sum only differs in the exponent on $n'+q$ and we
obtain
$$(n-n')(n-n'-1) n^{n-n'-2} - 2(n-n') n^{n-n'-1} H_{n-n'}
\\ + n^{n-n'} H_{n-n'}^2
+ n^{n-n'} H^{(2)}_{n-n'}.$$
Collecting everything including a factor of $1/2$ on the derivative we
finally have (observe cancelation of the polynomial in $n$ and $n'$)
$$\bbox[5px,border:2px solid #00A000]{
\mathrm{E}[T^2] =
n^2 \times H_{n-n'}^2
- n \times H_{n-n'}
+ n^2 \times H_{n-n'}^{(2)}.}$$
Using that
$$\mathrm{Var}[T] = \mathrm{E}[T^2] - \mathrm{E}[T]^2$$
we get
$$\bbox[5px,border:2px solid #00A000]{
\mathrm{Var}[T] =
n^2 \times H_{n-n'}^{(2)}
- n \times H_{n-n'}.}$$
The dominant term here is $\sim \frac{\pi^2}{6} n^2.$
These results for the expectation and the variance are in
agreement with Wikipedia on the coupon collector
problem,
where they are derived by probabilistic methods as opposed to the
Stirling numbers used here.