In independent Bernoulli trials with probability $p$ of success on each trial, let $X$ be the number of failures before the $n$th success. Then $$ \Pr(X=x) = \binom{-n}{\phantom{+}x} (-q)^x p^n \text{ for } x=0,1,2,3,\ldots, $$ where $q=1-p={}$probability of failure on each trial and $$ \binom m x = \frac{\overbrace{m(m-1)(m-2)\cdots(m-x+1)}^\text{$x$ factors}}{x!} \text{ for any } m\in \mathbb R, $$ i.e. $X$ has a negative binomial distribution. Then \begin{align} \operatorname E(X) & = nq/p, \\[5pt] \operatorname{var}(X) & = nq/p^2. \end{align} Thus $$\Pr(X>nq/p + 2\sqrt{nq} / p) \tag1$$ is the probability that $X$ is more than two standard deviations above the mean.
With $p=0.8= 1-q$ I graphed the probability in line $(1)$ as a function of $n$ for $n=1,\ldots,300$, using these R commands:
x <- seq(300)
y <- y <- 1 - pnbinom(x * (1-0.8)/0.8 + 2*sqrt(x*(1-0.8)/0.8^2), x, 0.8)
plot(x,y)
Here is the part from $230$ to $280$:
This looks neat and orderly. Now enter this R command:
lines(xx,yy)
(where $\texttt{xx}$ is the sequence from $230$ to $280$ and $\texttt{yy}$ is the corresponding set of $\texttt{y}$ values).
This looks like approximate periodicity with period $7,$ with the lowest points corresponding to indices congruent to $1 \bmod 7.$ So I looked at
xxx <- seq(43)*7 + 1
etc., and got this:
So my question is: Why should we expect all this?