Forms of Alternating Skipping Sequences

59 Views Asked by At

Consider the following sequence, where the two consecutive terms are positive and the next two are negative, and so on:

$$ a_n = 1 , 1, -1 , -1 , 1 , 1 , -1 , -1 , 1 ...$$

I've managed to think up some way of writing the sequence:

$$a_n = (-1)^\left \lfloor{\frac{n}{2}}\right \rfloor$$

$$ a_n = \sqrt2 \cdot\frac{d^n}{dx^n} (\sin x) , \text{at }x=\frac{\pi}{4}$$

Are there other ways that this sequence be written as? I would imagine there is a way to write it implicitly but I can't think of it.

Edit: Also adding this ugly one I forgot to initially:

$$a_n=\begin{cases} 1 & \text{ if } n \text{ is divisible by 4};\\1 & \text{ if } n-1 \text{ is divisible by 4};\\-1 & \text{ if } n-2 \text{ is divisible by 4};\\-1 & \text{ if } n-3 \text{ is divisible by 4}\end{cases}$$

4

There are 4 best solutions below

0
On

$$a_n=\begin{cases} 1 & \text{ if } n=4k+1 or \text{ } n= 4k+2;\\-1 & \text{ otherwise}\end{cases}$$

0
On

Note that this sequence is periodic with period $4$. A similar procedure may be conducted with any periodic sequence. Index the sequence from $0$. Then the sequence is the solution of the recurrence relation $$ a_n=a_{n-4};\quad (a_0=1,a_1=1,a_2=-1,a_3=-1) $$ This recurrence relation has characteristic equation $r^4-1=0$ and thus roots $r=1,-1,i,-i$. (In general if the sequence has period $k$, then the roots of the characteristic equation will be the $k$ roots of unity). The solution then is $$ a_n=c_0+c_1(-1)^n+c_2i^n+c_3(-i)^n\quad (n\geq0) $$ where the $c_i$ are determined such that $a_0=1,a_1=1,a_2=-1,a_3=-1$. This corresponds to solving a system of equations.

The sequence may also be encoded as the coefficients of the generating function $$ F(x)=\frac{1+x-x^2-x^3}{1-x^4}. $$

3
On

Hint. Try this $$ (-1)^{\large \frac{n(n-1)}2},\qquad n=0,1,2,3,\cdots. $$

0
On

A trig version using that sin, cos of $(\pi/2)n$ are $\pm 1$ of period $4$ is $$a_n=\sin \frac{\pi}{2}n - \cos \frac{\pi}{2}n.$$ [from the periodicity it only needs checking for $n=1,2,3,4.$]