I already got tired trying to think of a function $f:\{1,2,3,4\}\rightarrow \{0,1,1,0\}$ in other words:
$$f(1)=0\\f(2)=1\\f(3)=1\\f(4)=0$$
Don't suggest division in integers; it will not pass for me. Are there ways to implement it with modulo, absolute value, and so on, without conditions?
Another one (a bit more complicated than the parabola) is: $$f(x)=\frac{2}{\sqrt{3}}\sin\bigg(\frac{\pi}{3}(x-1)\bigg)$$
This one generates: $0,1,1,0,-1,-1,0,...$
And another simple one:
$$f(x)=1.5-\left | 2.5-x\right|$$