Let the probability of a success in a trial be $p$ (let $q = 1-p$).
We want to know $P(n)$, the probability of 3 (or more) consecutive successes happening at least once in $n$ trials.
$P(3)$ is $p^3$
$P(4)$ is $p^3 + qp^3$
i.e. the first 3 (and then we don't care), OR not the first one but the next three
$P(5)$ is $p^3 + qp^3 + q^2p^3 + qp^4$
If we let $Q(n)$ be $1-P(n)$ and consider further trials to a string of trials with no successes, we see (a 3rd order recurrence relation)
$Q(n)=qQ(n−1)+pqQ(n−2)+p^2qQ(n−3)$ for $n≥3$, $1$ otherwise
This well explained in https://math.stackexchange.com/q/1176022 (thanks @awkward)
My question is: can the solution be written explicitly as a function of $n$.
e.g. Could we solve say $P(20)$ without resorting to a computer program?