Point being no matter how many times you flip a coin the odds are always 50/50 but to see a run you have to multiply the odds so 50 percent of 50 percent. To attack bit coin you actual need a factor more hashing power to increase your odds to the point you can. Why else do you think the 6 confirmations were designed in. If cracking one block is all it took why wait for 6 confirms. The reason is the odds of maintaining your run of blocks goes in the toilet.
You don't have to maintain the forgery sequentially.
You misunderstand the math that explains why this specific number of confirmations was chosen by some exchanges/merchants.
Read the original Bitcoin whitepaper http://bitcoin.org/bitcoin.pdf (section 11). If an attacker possesses 10% of the global hashrate (q = 0.1), in order to reduce the probability of a double spend to less than 0.1%, you should wait for 6 confirmation, ie. force the attacker to fork the chains from 5 blocks behind, that's the z=5 quoted in this section. These are the design parameters that the 6 confirmations are supposed to protect against.
If an attacker has 50% of the hashrate (q = 0.5), then the math is completely off. No amount of confirmations is going to protect you against that.
As a side node, I think there is an approximation error, or rounding error when running the sample code with q = 0.5, because it shows the attacker would have a 100% success rate (it should be 50%).