TITLE: How long does it take a person with this "cheating" data-gathering strategy to achieve a desired result?
QUESTION [28 upvotes]: I have a perfectly fair coin, and my goal is to prove that it is unfair with a confidence level of 95%.  In order to accomplish this, I will cheat.  Whenever I fail to have enough evidence, I will simply increase the sample size by continuing to flip the coin.
To be specific, I will flip the coin until the proportion of heads is either small enough or large enough to be able to say that the coin is unfair.  Let's say that, for any given sample size $N$, there is at least a $95\%$ chance that the proportion of heads is within the confidence interval
$$0.5 ± f(N)$$
where $f(N)$ is some function. If I have flipped the coin a grand total of $N$ times, and the proportion of heads is outside of this interval, then I "conclude" that the fair coin is unfair and stop the process.  If the proportion is within the interval, then I flip the coin one more time and repeat the process with $N+1$.  One important detail is that I never "throw out" data.
What is the expected number of flips that I would have to make until I receive the "statistically significant" result I seek?
I've run a few simulations with my calculator, and it seems that either it takes a reasonable number of flips (like 44) or it takes a huge amount of time.  Why is this, assuming it's not programmer error?
Edit: More simulations
I ran some more simulations (on an actual PC, rather than a calculator).  I used two criteria for determining whether or not a result is significant.  First, I required that there be at least $20$ flips performed. Second, I used this value for the function:
$$f(N) = 1.9600 * \sqrt{\frac{0.5 * 0.5}N} = \frac{0.98}{\sqrt{N}}$$
More edits: this formula comes from the normal approximation for the binomial distribution, where $1.96$ is the required z-score and other part is the standard deviation of the proportion.
My plan for running the simulations was to set an upper limit for the number of flips, preform a huge number of trials, and see what proportion of trials exceeded the limit.  This way, I could gather data in a reasonable time limit.  After running a large number of simulations, I acquired this data:
# of flips      proportion > this number      sample size
100000          0.298                         n=1000
10000           0.41                          n=1000
1000            0.5516                        n=10000
100             0.7637                        n=10000
32              0.8726                        n=10000
64              0.8029                        n=10000
128             0.738                         n=10000
256             0.6768                        n=10000
512             0.6252                        n=10000
1024            0.563                         n=10000
2048            0.5126                        n=5000

REPLY [6 votes]: According to Blackwell and Freedman, A Remark on the Coin Tossing Game, the expected time for the number of heads to get outside $n/2 \pm a \sqrt{n}$ is finite for $a<0.5$ and infinite for $a \geq 0.5$. (As Henry points out below, they use $\pm 1$ instead of $(0,1)$ counting, so their boundary is $0 \pm \sqrt{n}$.) I'm afraid I don't understand their proof, but this means that the expectation time should be infinite, as Sharkos finds.