TITLE: Coin flipping and a recurrence relation
QUESTION [11 upvotes]: How can one solve the following recurrence relation?
$f(n) = 1 + \frac{1}{2^n} \sum_{k = 0}^n {{n}\choose{k}} f(k)$
$f(0) = 0$
As it happens, I can show $f(n) = \Theta(\log n)$ through other means (see below). But I'd like to know how to solve the recurrence "directly".
The recurrence relation comes from the following coin flipping problem. There are $n$ independent, unbiased coins, and we toss all of then for a number of rounds. Let $T(n)$ be the first round when each coin has got head at least once (ie, $T(n) = \text{arg} \min_t \text{s.t.} H_t(i) \geq 1; \forall i \in [n]$, where $H_t(i)$ is the number of heads the $i^{th}$ coin has got in the first $t$ rounds). Then one can see that $E(T(n))$ fulfills the recurrence relation mentioned above.
To see that $E(T(n)) = O(\log n)$, note that we reduce the number of coins who haven't gotten head yet by a factor of 2, in expectation. The $\log n$ bound follows routinely from that. On the other direction (ie, $E(T(n)) = \Omega(\log n)$), let $S = \log n/20$. Then at time $S$ with high probability, a large number of coins will still be "headless", from which the lower bound follows.

REPLY [6 votes]: Sums like
$f_n = \sum_{k \ge 0} (1 - (1-2^{-k})^n)$
(and even much more terribly looking ones) have been considered at many places in the literature. There are methods for evaluating them asymptotically at arbitrary precision (i.e. up to any error of order $n^{-c}$). One such method is the Mellin Transform, see 
http://algo.inria.fr/flajolet/Publications/mellin-harm.pdf
for an excellent survey by Flajolet et al. There, $f_n$ serves as one of several "running examples", and the authors show that
$f_n \sim \log_2 n + \gamma/\ln 2 + 1/2 + Q(\log_2 n) + O(n^{-1/2})$
where $Q$ is an explicitly given Fourier series. Interestingly, this series remains bounded, but oscillates forever.