So I need a formula that calculates -1,-1,+1,+1,-1,-1,+1,+1,... for a value of n that is not a piece wise.(adsbygoogle = window.adsbygoogle || []).push({});

So far I have come up with (-1)^[2n/3] but I don't like using greatest integer

I also did:

[cos(n × ∏)]!

The notation is not setup correctly and anyone that knows how to do it proper let me know. It is supposed to function like this:

cos(n∏)cos((n-1)∏)cos((n-2)∏)cos((n-3)∏)... until cos((n-n)∏)

I have dug in algebraically but don't think there is a solution, anyone have any thoughts on this?

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Need to figure out a formula that calculates -1,-1,+1,+1,-1,-1,+1,+1

**Physics Forums - The Fusion of Science and Community**