Answer: 1 - 2 / 2^n
Step-by-step explanation:
It should be 1 - 2 / 2^n. But the alternate case is that every 1 and 0 is alternating and this can only happen in 2 cases in the form: 10101010101... and 0101010101...
So since there are 2^n total combinations, the probability of two consecutive ones in the string of 1s and 0s of length n should be
1-2/2^n.