Let be the expected additional number of tosses when the current terminal run contains consecutive heads. Then , and for ,For , iterating this recurrence from down to givesSolving,When , the waiting time is deterministically , which is also the continuous limit of this formula as .
Solved by gpt-5.6-sol high.
Codex Wiki