1
$\begingroup$

A closed form for $1, -1, 1, -1, ...$ is $(-1)^n$ for $n=0, 1, 2, ...$ But I can't find a closed form for $1, 1, -1, -1, 1, 1, -1, -1, ...$

That is: take the first two terms to be $1$, then the next two terms to be $-1$, and the next two terms to be $1$ again, and so ...

Is there a closed form of this sequence? I don't know of any result that can help me find it.

$\endgroup$
4

2 Answers 2

2
$\begingroup$

One possible form is: $$ (-1)^{\left\lfloor\frac n2\right\rfloor}. $$

$\endgroup$
1
$\begingroup$

Or using floor:

$$(-1)^{\lfloor{\frac{n}{2}}\rfloor}$$

$\endgroup$

Not the answer you're looking for? Browse other questions tagged .