"Rule 150" is a fascinating one-dimensional and simple [cellular automaton](https://en.wikipedia.org/wiki/Cellular_automaton) giving raise to some quite chaotic behaviour. This is the starting point of this question.


Let $\{0,1\}^\mathbb{Z}$ denote the set of all functions $x:\mathbb{Z}\to \{0,1\}$. Let $+$ denote addition modulo $2$ on $\{0,1\}$ (corresponding to [${\sf XOR}$](https://en.wikipedia.org/wiki/XOR_gate) in computer science).


Define a function $f:\{0,1\}^\mathbb{Z} \to \{0,1\}^\mathbb{Z}$ by $x \mapsto f(x)$ where $f(x):\mathbb{Z}\to\{0,1\}$ is defined by $$f(x)(i) = x(i) + x(i-1) + x(i+1) \text{ for all }i\in \mathbb{Z}.$$ Inductively define $f^{(0)}(x) = x$, and $f^{(n+1)}(x) = f(f^{(n)}(x))$ for all integers $n\geq 0$.


**Question.** For what integers $n>1$ is there $x\in \{0,1\}^\mathbb{Z}$ such that $f^{(n)}(x) = x$ but $f^{(k)}(x) \neq x$ for all integers $k\geq 1$ with $k<n$?



Possible finite periodicities of "Rule 150" in the infinite setting
As already mentioned, this cellular automaton is Rule 150.


Rule 150 is an example of a bipermutive cellular automaton, meaning that it is both left permutive (the value of $f(x)(i)$ can be permuted by permuting the value of $x(i-1)$) and right permutive (the value of $f(x)(i)$ can be permuted by permuting the value of $x(i+1)$). Due to bipermutivity, by Theorem 6.3 in <https://core.ac.uk/download/pdf/236376428.pdf> Rule 150 is conjugate to the shift map $\sigma$ on $\{0,1,2,3\}^\mathbb{N}$ defined by $\sigma(x)(i)=x(i+1)$ for $x\in\{0,1,2,3\}^\mathbb{N}$, $i\in\mathbb{N}$ (conjugacy means that there is a bijection $\phi:\{0,1\}^\mathbb{Z}\to \{0,1,2,3\}^\mathbb{N}$ such that $\phi\circ f = \sigma\circ \phi$). For all integers there is a sequence $x\in\{0,1,2,3\}^\mathbb{N}$ such that $\sigma^{(n)}(x)=x$ but $\sigma^{(k)}(x)\neq x$ for $k<n$, so due to conjugacy the same holds for the function $f$.


