Getting the sequence $\{1, 0, -1, 0, 1, 0, -1, 0, \ldots\}$ without trig?

Let's try too : $|n \bmod 4-2|-1$


How about $\dfrac{i^n + (-i)^n}{2}$? (Of course, that is arguably just trigonometry in disguise).

Or as a recurrence: $a_n = -a_{n-2}$ with $(a_0,a_1)=(1,0)$.

Or $\begin{bmatrix}1 & 0\end{bmatrix}\begin{bmatrix}0&-1\\1&0\end{bmatrix}^n\begin{bmatrix}1\\0\end{bmatrix}$? (Which can be viewed as a better-disguised version of either of the two previous suggestions).


Whether this is simplest will depend on exactly what you mean, but the following is a pretty simple description. It's certainly simpler than anything involving trig functions.

$$a_n=\begin{cases} 0 & \text{if n is odd} \\ 1 & \text{if n is divisible by 4} \\ -1 & \text{otherwise} \end{cases}$$