Proof verification
Please check if the following proof is correct.
Let $p$ many iid variables $x_i$ be organised as a ring structure. The $x_i$ take the values $\pm 1$ with equal probability. Let $n<p$ such that $p/n$ is of order $1$. Consider the sum
$$ S = \frac{1}{n} \sum_{k=1}^p x_1 x_k \sum_{j=1}^n x_{1+j} x_{k+j} $$ where, due to the ring structure, the indices are taken modulo $p$.
The expectation value $\left< S \right>$ is taken over all configurations of the $\{x_i\}$. We are interested in the leading order $\cal{O}(1)$, neglecting $\cal{O}(\frac{1}{n})$. Then the only contribution arises from the equating case $\delta_{1,k}$ (i.e. $1=k$), giving (since $x_i^2 = 1$)
$$ \left< S \right> = \frac{1}{n} x_1 x_1 \sum_{j=1}^n x_{1+j} x_{1+j} = 1 + \cal{O}(\frac{1}{n}) $$
Question: perform the same expectation value for $\left< S^2 \right>$.
It is known from simulations that $ \left< S^2 \right> = 2 + p/n + \cal{O}(\frac{1}{n}) $. More precisely, the question is how to arrive there, i.e. which values have to equated?
Own work: write
$$ S^2 = \frac{1}{n^2} \sum_{k=1}^p \sum_{m=1}^p x_m x_k \sum_{i=1}^n \sum_{j=1}^n x_{1+j} x_{k+j} x_{1+i} x_{m+i} $$
The first contribution is to equate $\delta_{1,k}$ and $\delta_{1,m}$, giving terms $$ \frac{1}{n^2} x_1 x_1 \sum_{i=1}^n \sum_{j=1}^n x_{1+j} x_{1+j} x_{1+i} x_{1+i} = 1 $$ The second contribution is to equate $\delta_{i,j}$ and $\delta_{k,m}$, giving terms $$ \frac{1}{n^2} \sum_{k=1}^p x_k x_k \sum_{i=1}^n x_{1+i} x_{k+i} x_{1+i} x_{k+i} = \frac{p n}{n^2} = \frac{p}{n} $$ The third contribution is to equate $\delta_{i,m-1}$ and $\delta_{j,k-1}$, where both equating cases can only be performed for $n$ terms, according to the summations over the terms in $i$ and $j$. These $n$ terms will always be present, since due to the ring structure the required values for $m$ and $k$ are available.
We obtain $$ \frac{1}{n^2} \sum_{k=1 (\rm{n terms)}}^p \sum_{m=1 (\rm{n terms)}}^p x_k x_m \; x_{m} x_{k+m-1} x_{k} x_{k+m-1} = 1 $$ The third class of equating terms are only available due to the ring structure. Indeed, simulations show that for non-ring-variables $\left< S^2 \right> = 1 + p/n $ holds, which is established by the first two classes of equating terms.