login
A131742
a(4n) = a(4n+1) = 0, a(4n+2) = 3n+1, a(4n+3) = 3n+2.
1
0, 0, 1, 2, 0, 0, 4, 5, 0, 0, 7, 8, 0, 0, 10, 11, 0, 0, 13, 14, 0, 0, 16, 17, 0, 0, 19, 20, 0, 0, 22, 23, 0, 0, 25, 26, 0, 0, 28, 29, 0, 0, 31, 32, 0, 0, 34, 35, 0, 0, 37, 38, 0, 0, 40, 41, 0, 0, 43, 44, 0, 0, 46, 47, 0, 0, 49, 50, 0, 0, 52, 53, 0, 0, 55, 56, 0, 0, 58, 59, 0, 0, 61, 62, 0, 0, 64
OFFSET
0,4
FORMULA
a(n) = (1/16)*(cos(n*Pi/2)+sin(n*Pi/2)-1)*((6n-3)*cos(n*Pi/2)+cos(n*Pi)+(6n-3)*sin(n*Pi/2)). - Wesley Ivan Hurt, Sep 24 2017
From Colin Barker, Oct 06 2017: (Start)
G.f.: x^2*(1 + x - x^2 + x^3 + x^4) / ((1 - x)^2*(1 + x)*(1 + x^2)^2).
a(n) = a(n-1) - a(n-2) + a(n-3) + a(n-4) - a(n-5) + a(n-6) - a(n-7) for n>6.
(End)
MATHEMATICA
Table[Switch[Mod[n, 4], 2, 3 (n - 2)/4 + 1, 3, 3 (n - 3)/4 + 2, _, 0], {n, 0, 86}] (* Michael De Vlieger, Sep 25 2017 *)
PROG
(PARI) concat(vector(2), Vec(x^2*(1 + x - x^2 + x^3 + x^4) / ((1 - x)^2*(1 + x)*(1 + x^2)^2) + O(x^100))) \\ Colin Barker, Oct 06 2017
CROSSREFS
Sequence in context: A085969 A115179 A117434 * A257813 A278280 A351403
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Sep 20 2007
STATUS
approved