N\approx \frac{(K-1)(n-1)}{k-2}\pm\sqrt{\frac{(K-1)(n-1)(K-k+1)(n-k+1)}{(k-2)(k-2)(k-3)}} A derivation is found here: Talk:Mark and recapture.
The example (K, n, k) = (10, 15, 5) gives the estimate N ≈ 42 ± 21.5 .