login
A131734
Hexaperiodic [0, 1, 0, 1, 0, -1].
1
0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0
OFFSET
0,1
FORMULA
From Wesley Ivan Hurt, Apr 06 2015: (Start)
G.f.: x*(1+x^2-x^4)/(1-x^6).
Recurrence: a(n) = a(n-6).
a(n) = (1-(-1)^n)*(-1)^floor(2n/3)/2.
abs(a(n)) = A000035(n). (End)
EXAMPLE
G.f. = x + x^3 - x^5 + x^7 + x^9 - x^11 + x^13 + x^15 - x^17 + x^19 + x^21 + ...
MAPLE
A131734:=n->(1-(-1)^n)*(-1)^floor(2*n/3)/2: seq(A131734(n), n=0..100); # Wesley Ivan Hurt, Apr 06 2015
MATHEMATICA
CoefficientList[Series[x (1 + x^2 - x^4)/(1 - x^6), {x, 0, 100}], x] (* Wesley Ivan Hurt, Apr 06 2015 *)
PadRight[{}, 120, {0, 1, 0, 1, 0, -1}] (* Harvey P. Dale, Jun 09 2024 *)
PROG
(Magma) [(1-(-1)^n)*(-1)^Floor(2*n/3)/2 : n in [0..100]]; // Wesley Ivan Hurt, Apr 06 2015
(PARI) {a(n) = [ 0, 1, 0, 1, 0, -1, 0, 1][n%6 + 1]}; /* Michael Somos, Nov 11 2015 */
CROSSREFS
Cf. A000035 (absolute value).
Sequence in context: A000035 A188510 A091337 * A134452 A327515 A327532
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Sep 19 2007
STATUS
approved