TITLE: All two-point correlations equal to $0$, three-point correlation not $0$?
QUESTION [8 upvotes]: Let $a_1,a_2,a_3,\dotsc \in \{-1,1\}$ be a sequence. Suppose that, for all $j>0$ and all
$\epsilon, \epsilon'\in \{-1,1\}$, the proportion of $n\geq 1$ such that $(a_n,a_{n+j}) = (\epsilon,\epsilon')$ is $1/4$ (in the limit). I would like to see an example of such a sequence for which the average $S$ of $a_n a_{n+1} a_{n+2}$ is non-zero.
(... or doesn't exist; that would also be interesting.)
Reasons why this does not seem utterly trivial:
(a) We cannot have $S=1$ or $S=-1$; in fact, it's not too hard to show (using Cauchy-Schwarz) that $|S|\leq 1/\sqrt{2}$.
(b) Trying to produce such a sequence by a Markov chain where $a_{n+2}$ takes the value $1$ with probability $p_{(a_n,a_{n+1})}$ fails; that is, the only way in which the conditions are fulfilled (that is, all configurations $(a_n,a_{n+j})$ are equally likely) is if $p(a_n,a_{n+1}) = 1/2$ for every choice of $(a_n,a_{n+1})$. In other words, we would need a Markov chain of greater "depth".
Further, more open-ended question: what would be a "magic sauce" condition such that, if all configurations $(a_n,a_{n+j}) = (\epsilon,\epsilon')$ are equally likely for every $j$, and $\{a_n\}_n$ has "magic sauce", then the average of $a_n a_{n+1} a_{n+2}$ is zero?

REPLY [6 votes]: Let $\{b_n\}_{n \ge 1}$ be a sequence of independent random variables taking the values $\pm 1$ with probability $1/2$ each. Define $\{a_n\}_{n \ge 1}$ by
$a_n=b_{n-1} b_{n-2}$ if $\; n \equiv 0  \mod 3$ and  $a_n=b_n$ otherwise.
Then the  variables $a_n$ are pairwise independent. For example, if $\epsilon, \sigma \in {\pm1 }$ then $P(a_2=\epsilon,a_3=\sigma)=P(a_1=\sigma\epsilon, a_2=\sigma)=1/4$.
Thus, by the Law of large numbers, for all $j>0$ and all
$\epsilon, \sigma\in \{-1,1\}$, the limiting proportion of $n\geq 1$ such that $(a_n,a_{n+j}) = (\epsilon,\sigma)$ is $1/4$ with probability 1.
(Formally, to apply the LLN, consider for each integer $\ell \in [0,2j)$ the
limiting proportion of $k\geq 1$ such that $(a_{2kj+\ell},a_{2kj+\ell+j}) = (\epsilon,\sigma)$, then average over $\ell$.)
However, the asymptotic average   of $a_n a_{n+1} a_{n+2}$ is $1/3$ almost surely.