|
|
A112030
|
|
a(n) = (2 + (-1)^n) * (-1)^floor(n/2).
|
|
12
|
|
|
3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
The fractions A112031(n)/A112032(n) give the partial sums of a(n)/floor((n+4)/2).
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
|
Table of n, a(n) for n=0..77.
Index entries for linear recurrences with constant coefficients, signature (0,-1).
|
|
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
|
A112030 := proc(n)
(2 + (-1)^n) * (-1)^floor(n/2) ;
end proc: # R. J. Mathar, Jul 09 2013
|
|
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
|
|
CROSSREFS
|
Cf. A010684, A016116, A112031, A112032, A112033.
Sequence in context: A063062 A066056 A153284 * A010684 A176040 A125768
Adjacent sequences: A112027 A112028 A112029 * A112031 A112032 A112033
|
|
KEYWORD
|
sign,easy
|
|
AUTHOR
|
Reinhard Zumkeller, Aug 27 2005
|
|
STATUS
|
approved
|
|
|
|