TITLE: 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...$
QUESTION [66 upvotes]: 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$

REPLY [2 votes]: my 2 cents, how about 
$a_{n+1}=(-1)^{r(a_n)(1-a_n)}$
where $a_0 = 1$ and $r \in  \{1,2,3\}$
which is similar to the logistic map
in general I think that using a one dimensional chaotic polynomial could help.