<s>[INST] What is the expected number of red apples left when all the green apples are picked? We have 4 green apples and 60 red apples. Each time we pick one out without replacement. Then what is the expected number of red apples left when all 4 green apples are picked?
 [/INST] Suppose we have $G$ green apples  and $R$ red apples and ask about the
number of red apples left when all green apples have been picked.

The probability of  the last green apple being  picked as apple number
$q$ is
$${R+G\choose R}^{-1} {q-1\choose G-1}.$$
We now verify that this is indeed a proability. We use the Egorychev
method to evaluate the sum
$${R+G\choose R}^{-1} \sum_{q=G}^{R+G} {q-1\choose G-1}.$$
Introducing
$${q-1\choose G-1} =
\frac{1}{2\pi i}
\int_{|z|=\epsilon}
\frac{1}{z^G} (1+z)^{q-1} \; dz$$
we obtain for the sum of the probabilities
$${R+G\choose R}^{-1}
\frac{1}{2\pi i}
\int_{|z|=\epsilon}
\frac{1}{z^G} \frac{1}{1+z}
\sum_{q=G}^{R+G} (1+z)^q \; dz
\\ = {R+G\choose R}^{-1}
\frac{1}{2\pi i}
\int_{|z|=\epsilon}
\frac{1}{z^G} (1+z)^{G-1}
\sum_{q=0}^{R} (1+z)^q \; dz
\\ = {R+G\choose R}^{-1}
\frac{1}{2\pi i}
\int_{|z|=\epsilon}
\frac{1}{z^G} (1+z)^{G-1}
\frac{(1+z)^{R+1}-1}{1+z-1}
\; dz
\\ = {R+G\choose R}^{-1}
\frac{1}{2\pi i}
\int_{|z|=\epsilon}
\frac{1}{z^{G+1}} (1+z)^{G-1}
((1+z)^{R+1}-1)
\; dz$$
This has two pieces namely $[z^G] (1+z)^{R+G}$ and $[z^G] (1+z)^{G-1}$
and we get
$${R+G\choose R}^{-1} {R+G\choose G} = 1.$$
So we indeed have a probability here.

Continuing with the expectation we find
$${R+G\choose R}^{-1} \sum_{q=G}^{R+G} {q-1\choose G-1}
(R+G-q)
\\ = R+G
- {R+G\choose R}^{-1} \sum_{q=G}^{R+G} q {q-1\choose G-1}
\\ = R+G
- G {R+G\choose R}^{-1} \sum_{q=G}^{R+G} \frac{q}{G} {q-1\choose G-1}
\\ = R+G
- G {R+G\choose R}^{-1} \sum_{q=G}^{R+G} {q\choose G}.$$
Introducing
$${q\choose G} =
\frac{1}{2\pi i}
\int_{|z|=\epsilon}
\frac{1}{z^{G+1}} (1+z)^{q} \; dz$$
we obtain for the sum component of the expectation
$$\frac{1}{2\pi i}
\int_{|z|=\epsilon}
\frac{1}{z^{G+1}} 
\sum_{q=G}^{R+G} (1+z)^q
\; dz
\\ \frac{1}{2\pi i}
\int_{|z|=\epsilon}
\frac{1}{z^{G+1}} (1+z)^G
\sum_{q=0}^{R} (1+z)^q
\; dz
\\ \frac{1}{2\pi i}
\int_{|z|=\epsilon}
\frac{1}{z^{G+1}} (1+z)^G
\frac{(1+z)^{R+1}-1}{1+z-1}
\; dz
\\ \frac{1}{2\pi i}
\int_{|z|=\epsilon}
\frac{1}{z^{G+2}} (1+z)^G
((1+z)^{R+1}-1)
\; dz.$$
We  have  the  two  pieces $[z^{G+1}]  (1+z)^{G+R+1}$  and  $[z^{G+1}]
(1+z)^G$ and obtain
$${R+G+1\choose G+1}.$$
Returning to the expectation we have
$$R+G - G {R+G\choose R}^{-1} {R+G+1\choose G+1}
\\ = R+G - G 
\frac{(R+G+1)! \times R! \times G!}{(R+G)! \times (G+1)! \times R!}.$$
This simplifies to
$$\bbox[5px,border:2px solid #00A000]{
R+G - G \frac{R+G+1}{G+1}
= R - G \frac{R}{G+1}
= \frac{R}{G+1}.}$$
In particular for $4$ green apples and $60$ red apples we get
$$64- 4\frac{65}{5} = 64 - 4\times 13 
= 12 = \frac{60}{5}.$$
This formula may be verified with the following Maple code (warning --
total enumeration, use on small values for the number of apples)

with(combinat);

X :=
proc(G, R)
    option remember;
    local perm, src, pos, seen, res;

    src :=
    [seq(GG, q=1..G), seq(RR, q=1..R)];

    res := 0;

    for perm in permute(src) do
        seen := 0;

        for pos to R+G do
            if perm[pos] = GG then
                seen := seen + 1;

                if seen = G then
                    break;
                fi;
            fi;
        od;

        res := res + (R+G)-pos;
    od;

    res/binomial(R+G, R);
end;

Y :=(G, R) -> R/(G+1);

</s>