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)$?