OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
Euler transform of period 6 sequence [ -2, -1, 0, -1, -2, -2, ...].
a(n) = b(2n+1) where b(n) is multiplicative and b(2^e) = 0^e, b(3^e) = -2 if e>0, b(p^e) = e+1 if p == 1 (mod 6), b(p^e) = (1+(-1)^e)/2 if p == 5 (mod 6).
G.f.: Sum_{k>0} F(x^(6k-5))-F(x^(6k-1)) where F(x)=(x-x^3)/(1+x^2+x^4).
a(3*n+2) = 0.
a(3*n) = A097195(n).
a(3*n+1) = -2*A033762(n).
MATHEMATICA
QP = QPochhammer; s = QP[q]^2*(QP[q^6]^3/(QP[q^2]*QP[q^3]^2)) + O[q]^105; CoefficientList[s, q] (* Jean-François Alcover, Nov 30 2015, adapted from PARI *)
PROG
(PARI) {a(n)=if(n<0, 0, n=2*n+1; sumdiv(n, d, kronecker(-12, d)*[0, 1, 0, -2, 0, 1][n/d%6+1]))}
(PARI) {a(n)=local(A, p, e); if(n<0, 0, n=2*n+1; A=factor(n); prod( k=1, matsize(A)[1], if(p=A[k, 1], e=A[k, 2]; if(p==2, 0, if(p==3, -2, if(p%6==1, e+1, !(e%2)))))))}
(PARI) {a(n)=local(A); if(n<0, 0, A=x*O(x^n); polcoeff( eta(x+A)^2*eta(x^6+A)^3/eta(x^2+A)/eta(x^3+A)^2, n))}
CROSSREFS
KEYWORD
sign
AUTHOR
Michael Somos, Oct 02 2006
STATUS
approved