Hey renolovexoxo.

In terms of the changing sign parameter, you might want consider (-1)^([n/2]) where [n/2] is the floor function:

Floor and ceiling functions - Wikipedia, the free encyclopedia

The floor function will generate for n = 0,1,2,3 the values of 0,0,1,1 which gives the kind of behaviour you are looking for.