Creating an alternating sequence of positive and negative numbers 
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)$?

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}$
