OFFSET
1,2
FORMULA
Euler transform of period 18 sequence [ -2, -1, -1, -1, -2, 0, -2, -1, -2, -1, -2, 0, -2, -1, -1, -1, -2, -2, ...].
Moebius transform is period 18 sequence [1, -3, -1, 3, -1, 3, 1, -3, 0, 3, -1, -3, 1, -3, 1, 3, -1, 0, ...].
a(n) is multiplicative with a(2^e) = (-1+3*(-1)^e)/2, a(3^e) = 0^e, a(p^e) = e+1 if p == 1 (mod 6), a(p^e) = (1+(-1)^e)/2 if p == 5 (mod 6).
G.f.: Sum_{k} x^(3k+1)*(1-2*x^(3k+1))/(1-x^(18k+6)).
EXAMPLE
q - 2*q^2 + q^4 + 2*q^7 - 2*q^8 + 2*q^13 - 4*q^14 + q^16 + 2*q^19 + ...
MATHEMATICA
f[p_, e_] := If[Mod[p, 6] == 1, e+1, (1+(-1)^e)/2]; f[2, e_] := (-1+3*(-1)^e)/2; f[3, e_] := 0; a[n_] := Times @@ f @@@ FactorInteger[n]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Sep 04 2023 *)
PROG
(PARI) {a(n)=local(A); if(n<1, 0, n--; A=x*O(x^n); polcoeff( eta(x+A)^2*eta(x^9+A)*eta(x^18+A)/eta(x^2+A)/eta(x^3+A), n))}
CROSSREFS
KEYWORD
sign,easy,mult
AUTHOR
Michael Somos, Jan 17 2006
STATUS
approved