You're flipping a coin f times. A possible outcome is a sequence of characters, either H or T. The number of binary sequences of length f is 2^f. The probability of a sequence with length f is 1/2^f, or 2^-f.
The number of sequences with 2 heads in a row is half the number of sequences with 2 (of anything) in a row, doubles of any kind. Which leaves the question, how many sequences (of a given length, f), don't have doubles?
Only 2: HTHTHT... and THTHTH...
So the probability that heads never occurs twice, when you flip a coin $F$ times, is the number of possible outcomes ($2^F$) minus the number of sequences (of that length) that have no doubles ($2$), divided by $2$ because we only care about one of the two kinds of doubles - heads.
P(HH | f flips) = 1/2^(f-1)
P(HH | coin flipped $f$ times) = P(HH or TT | $f$ flips)/2 = 1-P(neither HH nor TT | f flips) = 1 - number of outcomes without doubles/number of outcomes = 1-2/2^f = 1-1/2^(f-1) = 1/2-1/2^f. P(no HH) = 1 - P(HH) = 1/2^(f-1)
Alternate way of showing the P(no doubles): Markov Chains. After the coin has been flipped once, the coin either reads H or T. There is a 1/2 chance that after the next flip it will read the same way, which means the P(no doubles) halves.
Sequences possess a state - either they contain a double (HH or TT) or they do not. They can go from having no double to having doubles, but not vice versa.
The probability that all sequences which do not contain doubles will contain doubles after another flip is 1/2.
So after you flip it once, you have H or T. P(no doubles) = 1. You flip it again, HH, HT, TH, or TT. P(no doubles) = 1/2. Again: HHH, HHT, HTH, HTT, THH, THT, TTH, TTT. P(no doubles) = 1/4.
Since P(no doubles) halves with each flip, and is 1 when flips = 0, P(no doubles) = (1/2)^(f-1).