4

TL; DR -> How does one create a series where at an arbitrary $nth$ term, the number will become negative.

I'm learning a lot of mathematics again, primarily because there are such wonderful resources available on the internet to learn. On this journey, I've stumbled across some very interesting sequences, for example:

$$ a_n = \{ 1, -1, 1, -1, 1, -1, ... \tag{1} \}$$

And this is one example of an interesting diverging sequence, and this can be created using this function:

$$f(x) = x^{n+1} \tag{2}$$

Now this is a sequence that you can easily create, how would one create a series where you can have the $-1$ appear at an arbitrary $nth$ term?

For example:

$$ a_n = \{ 1, 1, -1, 1, 1, -1, ... \tag{3}\}$$

How would one attempt to define the series on $(3)$?

4 Answers4

3

$a_n=\frac13-\frac23\cos\frac{2n\pi}3-\frac23\cos\frac{4n\pi}3$

bof
  • 6,376
2

There are basically two approaches as I see it. Either you just say $$ a_n = \begin{cases}-1 & \text{if }3|n\\\\1 & \text{otherwise}\end{cases} $$ or, if you want a specific formula, the best way (I think) to go about it would be to find some sequence which is odd / even wherever you want $-1$ and even / odd wherever you want $1$, and raise $(-1)$ to that power. As an example, the Fibonacci sequence $F_n$ defined by $$ F_n = F_{n-1} + F_{n-2}, \quad F_1 = 1, \quad F_2 = 1 $$ is even at every third term, which means that the sequence $$ a_n = -(-1)^{F_n} $$ would be what you're looking for. This quickly gets pretty darn dirty, though, especially if you want to swap $F_n$ for the acual expression. I'd go with the top option, personally.

Arthur
  • 204,511
1

I know this might seem like a bit of a disappointing answer, but usually you would just define it exactly how you'd explain it (and hence piecewise).

$a_n= \begin{cases} -1 & 3\mid n \\ 1 & 3\nmid n \end{cases}$

or if you want $-1$ to appear every $k$'th term,

$a_n= \begin{cases} -1 & k\mid n \\ 1 & k\nmid n \end{cases}$

john
  • 5,703
0

what about $(-1)^{n(n-1)/2}$?

This seems to work if the sequence starts at $n=0$.

Javi
  • 6,541