It is possible, although somewhat tedious, to do this exactly using the principle of inclusion and exclusion. If it were 20 heads in a row instead of 15 it would be a little simpler.
We want to count the number of ways to get 15 or more heads in a row. Start by trying to count the number of ways to get exactly 15 heads in a row, then count the number of ways to get exactly 16, and so forth, and add them. For a first attempt to count the ways to get exactly 15, we first choose a position to start our run of 15, then let the flips that are not in the run vary at will. The cases are:
- position 1 (first head of the run is at the start of the string). 16 determined spots including the tail after the run of heads, 24 left to vary. 2^24 possible ways, one position
- position 2-25 (middle of the string). 17 determined spots including the tail before and after the run, 23 left to vary. 2^23 possible ways, 24 positions
- position 26 (end of the string) 16 determined spots including the tail before the run of heads, 24 left to vary. 2^24 possible ways, one position.
So we get as our first attempt 2*2^24 + 24*2^23. But this is not exactly correct, because what if there are 2 runs of exactly 15 heads? We'd be counting that case twice.
Fortunately, 2 runs of 15 heads is incredibly unlikely, so we can make a good first approximation if we simply ignore this hitch. Continuing, we find that the number of ways f(i) to have a run of exactly i heads, ignoring the edge cases of runs of length 39 or 40, is about
f(i) = 2 * 2^(40 - i - 1) + (40-i-1) * 2^(40 - i - 2)
That would give a value of
\sum_{i=15}^{38} (2\cdot 2^{40-i-1} + (i+2) 2^{40-i-2})
Divide this by 2^40 to get a reasonably close approximation of your probability, 0.00041199.
If you want, we can be exact. We can find the number of ways to get 2 runs of 15 or more heads each, because there is no way to get 3 runs of that length. Define a function:
h(i,j) = the number of ways to get a run of exactly i heads and a different run of exactly j heads (where i,j >= 15, and h(i,j) = 0 if i+j >= 40).
You can reason for yourself (work by cases, as I did for f(i)) what h(i,j) would be, if you're interested. Note that each h(i,j) is counted twice in our earlier approximation; it is counted when we count the run of length i, and it is counted again when we count the run of length j (and if i=j it is counted twice with the run of length i). So we can just subtract each h(i,j), and the _exact_ answer for your probability is
\frac{1}{2^{40}} \left ( \sum_{i=15}^{40} f(i) - \sum_{i=15}^{40} \sum_{j=15}^{40} h(i,j) \right )
It would be tedious to finish defining h(i,j) and f(i) to get a numeric value for this, but you can be assured it is very close to, though a bit less than, 0.00041199. (It's probably the same as the approximation, to that number of digits).