Tossing coin until heads We perform independent Bernoulli trials with unknown probability of success P.
We perform them by series, each of 1000 trials, and stop when at least one success happens.
So the number of trials N is a multiple of 1000, and the number of successes K is 1 through 1000.
How can one estimate P?
The maximum likelihood estimator is K/N. Is it good?
 A: Bayesian techniques may help answer this.  
Suppose you start with a Beta distribution with parameters $\alpha$ and $\beta$ as the prior distribution for $P$.  After $1000$ flips and $K$ successes, the posterior distribution will again be a Beta distribution with parameters $\alpha + K$ and $\beta +1000-K$.  If $K$ is positive then you can stop there; if it is zero, you can repeat, but using the new parameters for the prior for the next set of $1000$ flips.  
Eventually you will stop (with probability $1$), and then the posterior distribution will have parameters $\alpha + K$ and $\beta +N-K$.  This does not just give you a central estimate for $P$ with the expected value being $\dfrac{\alpha + K}{\alpha + \beta + N}$, but also a way of looking at the uncertainty in this estimate of $P$.
Note that if originally you started with the improper parameters $\alpha=\beta=0$ then the central estimate will be $\frac{K}{N}$.  There are also arguments for starting with $\alpha=\beta=\frac{1}{2}$ or $\alpha=\beta=1$, but these differences in initial assumptions usually only affect the final distribution slightly when you have large samples.  
A: Let $p = Pr(\text{sucess})$
Let $N = \text{number of 1000-throw trials}$
Let $k = \text{number of success in the final trial that stops the sequence}$ 
$L=(1-p)^{1000(N-1)} {1000 \choose{k}} p^{k} (1-p)^{1000-k}$
Maximizing, $\hat{p}={k \over{1000N}}$
As you suggested. 
