SOLUTION: Hello, I would to ask the general formula of the sequence: 1 1 -1 -1 1 1 -1 -1 1 1 the pattern goes on and on. Thank you!

Algebra ->  Sequences-and-series -> SOLUTION: Hello, I would to ask the general formula of the sequence: 1 1 -1 -1 1 1 -1 -1 1 1 the pattern goes on and on. Thank you!      Log On


   



Question 1024880: Hello, I would to ask the general formula of the sequence:
1
1
-1
-1
1
1
-1
-1
1
1
the pattern goes on and on. Thank you!

Answer by Edwin McCravy(20056) About Me  (Show Source):
You can put this solution on YOUR website!
(-1)^(int((n-1)/4)+int((n+1)/4))

where int(x) = the greatest integer not exceeding x.
This function is often denoted floor(x).

So it could be written

(-1)^(floor((n-1)/4)+floor((n+1)/4))

Texas Instrument calculators use int(x).

Edwin