Suppose we have the following sequence:
{$a_n$} such as:
$a_0 = 1, \\
a_1 = 1, \\
a_2 = -1, \\
a_3 = -1, \\
a_4 = 1, \\
a_5 = 1, \\
...
$
How can we find the general term of this sequence? I tried using a trigonometric function e.g. $\alpha \sin(x+\phi)$, then we impose some constraints on $\alpha$ and $\phi$ to get that sequence, but I get lost, is there any clever way to find the general term?
EDIT: The question is identified as duplicate, but that answer does not solve the question, because I am looking for a solution that does not involve floor function.