PeroK said:
You only get a shot at 10 tails from the 2nd toss onwards if the previous toss was a head. Otherwise you're double counting.
This isn't quite right, on further thought, because strings containing TTTTTTTTTTHTTTTTTTTTT satisfy your head-before-the-tails rule, but you're double counting still.
Here's an argument:
Consider throwing ten coins. There's exactly one sequence containing ten tails.
Now consider throwing another coin. The one sequence from ten throws becomes two (we don't care what the new coin is), and the one sequence that is one head followed by nine tails can become ten tails with the extra coin, for a total of three sequences containing ten tails.
Now consider throwing another coin. The three sequences become six, and there are additionally two sequences ending in nine tails that become ten tails, for a total of eight sequences containing ten tails.
In fact, in general, throwing another coin takes the existing sequences that include ten tails and doubles them, and adds ##2^{n-11}## new sequences, where ##n## is the total number of coins we've thrown (we need HTTTTTTTTTT at the end of the sequence, which is eleven throws, but any sequences are valid for the ##n-11## throws before that). You can work out that that is ##2^{n-10}+(n-10)2^{n-11}## sequences. But this pattern only holds up to ##n=20## (6,144 out of 1,048,576 sequences), because at ##n=21## we start to get sequences like my first paragraph.
Nevertheless, similar reasoning holds. Adding another coin takes our number of existing sequences and doubles it, and takes sequences that end in nine tails and makes them ten tails. You just need to remove the sequences that already have a run of ten in the first ##n-11## throws - and we know how many of those there are from above. If you track through all the doubling (which I did by mucking around in a spreadsheet), it comes down to ##2^{n-10}+(n-10)2^{n-11}-(n-17)\left(2^{n-22}+(n-22)2^{n-23}\right)##. That pattern holds to ##n=30##, which is fine for this problem.
So the exact answer is that with 30 coin tosses there are 11,517,696 sequences out of 1,073,741,824 possible sequences which have at least one run of at least ten tails. That's about 1.073%, which is more or less exactly what my Monte Carlo sim was saying.
I've actually tested this by explicit enumeration - the two formulae above match the results I get out to 30 throws.
@Fobi - 1.252% seems a bit high, so I suspect there's something still a bit off in your code.