login
A131756
Period 3: repeat [2, -1, 3].
2
2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3
OFFSET
0,1
FORMULA
a(n) = 4/3+2/3*cos(2/3*Pi*n)-4/3*3^(1/2)*sin(2/3*Pi*n). - R. J. Mathar, Nov 15 2007
G.f.: (2-x+3*x^2)/(1-x^3). - Jaume Oliver Lafont, Mar 24 2009
a(n) = a(n-3) for n>2. - Wesley Ivan Hurt, Jul 01 2016
MAPLE
seq(op([2, -1, 3]), n=0..50); # Wesley Ivan Hurt, Jul 01 2016
MATHEMATICA
PadRight[{}, 100, {2, -1, 3}] (* Wesley Ivan Hurt, Jul 01 2016 *)
PROG
(PARI) a(n)=[2, -1, 3][1+n%3] \\ Jaume Oliver Lafont, Mar 24 2009
(Magma) &cat [[2, -1, 3]^^30]; // Wesley Ivan Hurt, Jul 01 2016
CROSSREFS
Cf. A130784.
Sequence in context: A181743 A330727 A174737 * A212620 A194859 A194838
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Oct 04 2007
STATUS
approved