login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A135694
Period 6: repeat [1, -1, -1, -1, 0, 2].
1
1, -1, -1, -1, 0, 2, 1, -1, -1, -1, 0, 2, 1, -1, -1, -1, 0, 2, 1, -1, -1, -1, 0, 2, 1, -1, -1, -1, 0, 2, 1, -1, -1, -1, 0, 2, 1, -1, -1, -1, 0, 2, 1, -1, -1, -1, 0, 2, 1, -1, -1, -1, 0, 2, 1, -1, -1, -1, 0, 2, 1, -1, -1, -1, 0, 2, 1, -1, -1, -1, 0, 2, 1, -1, -1, -1, 0, 2, 1, -1, -1, -1, 0, 2
OFFSET
0,6
FORMULA
From R. J. Mathar, Mar 31 2008: (Start)
a(n) = a(n-6) for n>5. a(n) = -a(n-2) - a(n-4) for n>3.
a(n) = (A119910(n+3) - A049347(n+1))/2 for n>0.
G.f.: (1-x-2*x^3)/((x^2-x+1)*(x^2+x+1)). (End)
a(n) = (3*cos(n*Pi/3) - 8*sqrt(3)*cos(n*Pi/6)^3*sin(n*Pi/6))/3. - Wesley Ivan Hurt, Jun 22 2016
MAPLE
A135694 := proc(n) op((n mod 6)+1, [1, -1, -1, -1, 0, 2]) ; end: seq(A135694(n), n=0..150) ; # R. J. Mathar, Feb 07 2009
MATHEMATICA
PadRight[{}, 100, {1, -1, -1, -1, 0, 2}] (* Wesley Ivan Hurt, Jun 22 2016 *)
PROG
(Magma) &cat [[1, -1, -1, -1, 0, 2]^^20]; // Wesley Ivan Hurt, Jun 22 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Feb 24 2008
EXTENSIONS
More periods from R. J. Mathar, Feb 07 2009
STATUS
approved