OFFSET
0,5
LINKS
Michael Somos, Rational function multiplicative coefficients.
Index entries for linear recurrences with constant coefficients, signature (1,-1,0,1,-1,1,0,-1,1,-1).
FORMULA
Euler transform of length 24 sequence [1, -1, -2, 1, -1, 1, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1].
a(n) is multiplicative with a(2) = 1, a(4) = -2, a(2^e) = 0 if e > 2, a(3^e) = 0^e, a(p^e) = 1, if p == 1 (mod 6), a(p^e) = (-1)^e if p == 5 (mod 6).
a(n) = -a(-n) = a(n+24), a(n) + a(n+12) = 2 * A128834(n) for all n in Z.
a(2*n + 1) = a(4*n + 2) = a(8*n + 1) = a(8*n + 7) = A057078(n). a(3*n) = a(8*n) = 0. a(4*n + 1) = a(8*n + 2) = -a(8*n + 5) = A049347(n-1). a(6*n + 1) = -a(6*n + 5) = 1. a(6*n + 2) = A007877(n-1).
G.f.: f(x) - f(x^4) where f(x) := x / (1 - x + x^2).
G.f.: x * (1 - x^3) * (1 - x^5) / ((1 - x + x^2) * (1 - x^4 + x^8)).
EXAMPLE
G.f. = x + x^2 - 2*x^4 - x^5 + x^7 - x^10 - x^11 + x^13 + x^14 - x^17 + ...
MATHEMATICA
a[ n_] := (-1)^Quotient[ n, 3] Sign[Mod[n, 3]] - If[ Mod[n, 4] > 0, 0, (-1)^Quotient[ n, 12] Sign[Mod[n, 12]]];
PROG
(PARI) {a(n) = (-1)^(n\3) * (n%3>0) - if( n%4, 0, (-1)^(n\12) * (n%12>0))};
(PARI) {a(n) = my(m = abs(n)); sign(n) * polcoeff( x * (1 - x^3) * (1 - x^5) / ((1 - x + x^2) * (1 - x^4 + x^8)) + x * O(x^m), m)};
CROSSREFS
KEYWORD
sign,easy,mult
AUTHOR
Michael Somos, May 13 2015
STATUS
approved