OFFSET
0,1
COMMENTS
Sum of the two Cartesian coordinates from the image of the point (2,1) after n 90-degree counterclockwise rotations about the origin. - Wesley Ivan Hurt, Jul 06 2013
LINKS
FORMULA
a(n) = A010684(n+1) * (-1)^floor(n/2).
O.g.f.: (3+x)/(1+x^2). - R. J. Mathar, Jan 09 2008
MAPLE
MATHEMATICA
LinearRecurrence[{0, -1}, {3, 1}, 100] (* Jean-François Alcover, Nov 24 2020 *)
PROG
(PARI) a(n)=[3, 1, -3, -1][n%4+1] \\ Charles R Greathouse IV, Aug 21 2011
(Python)
def A112030(n): return (3, 1, -3, -1)[n&3] # Chai Wah Wu, Jan 31 2023
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Reinhard Zumkeller, Aug 27 2005
STATUS
approved