Is there a simple function that generates the series; $1,1,2,1,1,2,1,1,2...$ or $-1,-1,1,-1,-1,1...$ I'm thinking about this question in the sense that we often have a term $(-1)^n$ for an integer $n$, so that we get a sequence $1,-1,1,-1...$ but I'm trying to find an expression that only gives every 3rd term as positive, thus it would read;
$-1,-1,1,-1,-1,1,-1,-1...$
Alternatively a sequence yielding $1,1,2,1,1,2,1,1,2...$ could also work, as $n$ could just be substituted by it in $(-1)^n$

Let $\omega \neq 1$ be a cubic root of unity. We have that $1 + \omega + \omega^2 = 0$, i.e. $\omega + \omega^2 = -1$. Also, $w^{-1} = \omega^2$ and $\omega^3 = 1$.
Put $a_n = \omega^n + \omega^{-n}$. We get the sequences
\begin{eqnarray*}
a_0 &=& \omega^{0} + \omega^{0} = 2 \\
a_1 &=& \omega^{1} + \omega^{-1} = \omega^{1} + \omega^{2} = -1 \\
a_2 &=& \omega^{2} + \omega^{-2} = \omega^{2} + \omega^{1} = -1 \\
\end{eqnarray*}
and then the sequence repeats.
If you put $b_n = \frac{2 a_n -1}{3}$, then you get $1, -1, -1, 1, -1, -1, \cdots$.
