OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..2500
Michael Somos, Rational function multiplicative coefficients.
Index entries for linear recurrences with constant coefficients, signature (0,0,-2,0,0,-1).
FORMULA
Euler transform of length 6 sequence [-2, 1, -2, -1, 0, 2].
a(n) is multiplicative with a(2^e) = -(2^e) if e>0, a(3^e) = 2 * 3^(e-1) if e>0, otherwise a(p^e) = p^e.
G.f.: f(x) - f(x^3) where f(x) := x / (1 + x)^2.
G.f.: x * (1 - x)^2 * (1 + x^2) / (1 + x^3)^2.
G.f.: x * (1 - x)^2 * (1 - x^3)^2 * (1 - x^4) / ((1 - x^2) * (1 - x^6)^2).
a(n) = -a(-n) = -(-1)^n * A186101(n) for all n in Z.
Dirichlet g.f.: zeta(s-1)*(2^s-4)*(3^s-1)/6^s. - Amiram Eldar, Dec 29 2022
EXAMPLE
G.f. = x - 2*x^2 + 2*x^3 - 4*x^4 + 5*x^5 - 4*x^6 + 7*x^7 - 8*x^8 + 6*x^9 + ...
MATHEMATICA
a[ n_] := -(-1)^n If[ Divisible[ n, 3], 2 n/3, n];
a[ n_] := n {1, -1, 2/3, -1, 1, -2/3}[[Mod[n, 6, 1]]];
CoefficientList[Series[x*(1-x)^2*(1+x^2)/(1+x^3)^2, {x, 0, 60}], x] (* G. C. Greubel, Aug 02 2018 *)
PROG
(PARI) {a(n) = -(-1)^n * if( n%3, n, 2*n/3)};
(PARI) my(x='x+O('x^60)); concat([0], Vec(x*(1-x)^2*(1+x^2)/(1+x^3)^2)) \\ G. C. Greubel, Aug 02 2018
(Magma) m:=60; R<x>:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!(x*(1-x)^2*(1+x^2)/(1+x^3)^2)); // G. C. Greubel, Aug 02 2018
CROSSREFS
KEYWORD
sign,mult,easy
AUTHOR
Michael Somos, May 04 2015
STATUS
approved