OFFSET
0,8
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..10000
FORMULA
From Michael Somos, May 25 2005: (Start)
Euler transform of period 9 sequence [ 0, 0, 1, 0, 0, 1, 0, 0, -2, ...].
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = u^2*w - 2*u*w^2 - v^3.
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^3), A(x^6)) where f(u1, u2, u3, u6) = u1*u3^2 + u1*u6^2 - u1*u3*u6 - u2^2*u3.
Multiplicative with a(3^e) = 0^e, a(p^e) = e+1 if p == 1 (mod 3), a(p^e) = (1+(-1)^e)/2 if p == 2 (mod 3).
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^3), A(x^6)) where f(u1, u2, u3, u6) = u2*u3^2 + 2*u2*u3*u6 + 4*u2*u6^2 - u1^2*u6. (End)
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2*Pi/(9*sqrt(3)) = 0.403066... . - Amiram Eldar, Oct 13 2022
EXAMPLE
G.f. = q + q^4 + 2*q^7 + 2*q^13 + q^16 + 2*q^19 + q^25 + 2*q^28 + 2*q^31 + ...
MATHEMATICA
a[ n_] := SeriesCoefficient[ q QPochhammer[ q^9]^3 / QPochhammer[ q^3], {q, 0, n}]; (* Michael Somos, Feb 22 2015 *)
f[p_, e_] := If[Mod[p, 3] == 1, e + 1, (1 + (-1)^e)/2]; f[3, e_] := 0; a[0] = 0; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100, 0] (* Amiram Eldar, Oct 13 2022 *)
PROG
(PARI) {a(n) = local(A, p, e); if( n<0, 0, A=factor(n); prod(k=1, matsize(A)[1], if( p=A[k, 1], e=A[k, 2]; if( p!=3, if( p%3==1, e+1, !(e%2))))))}; \\ Michael Somos, May 25 2005
(PARI) {a(n) = local(A); if( (n<1) || (n%3!=1), 0, n = (n-1)/3; A = x * O(x^n); polcoeff( eta(x^3 + A)^3 / eta(x + A), n))}; \\ Michael Somos, May 25 2005
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
STATUS
approved