Let $G$ be a (finite) group, and $a, b \in G$ be any two elements. Consider the sequence defined by
\begin{eqnarray\*}
s\_0 &=& a, \\
s\_1 &=& b, \text{and} \\
s\_{n+2} &=& s\_{n+1} s\_{n} \text{ for $n \geq 0$}.
\end{eqnarray\*}
This sequence is what we get when replace the letters in the algae L-system (cf: <https://en.wikipedia.org/wiki/L-system#Example_1:_Algae>) with the two elements of our group. As $G$ is finite, there are finitely many pairs $(s\_{n+1}, s\_{n})$ and hence that the sequence will eventually start repeating. Do we know more about this sequence $(s\_n)$? Like, when is it periodic?



Are there references for the properties of words formed in finite groups using L-systems? (In particular, the algae L-system.)
Here are some observations about the sequence when $a$ and $b$ commute.


If $a=e$, then $s\_n=b^{F\_n}$, where $F\_n$ is the $n$th Fibonacci number.
Let $|b|$ denote the order of $b$; we are interested in Fibonacci numbers modulo $|b|$.
The Fibonacci numbers are periodic modulo any finite number, so the sequence $s\_n$ is periodic.
The period is the [Pisano period](https://en.wikipedia.org/wiki/Pisano_period) $\pi(|b|)$.


If $a$ commutes with $b$, then $s\_n=b^{F\_n}a^{F\_{n-1}}$ (with the natural convention that $F\_{-1}=1$).
Therefore $s\_n$ is a (commutative) product of two periodic sequences and therefore periodic.


If $a$ and $b$ are powers of the same element, we get again the Fibonacci numbers but with different initial conditions than $F\_0=0$ and $F\_1=1$.
Again, we get periodicity.


