OFFSET
1,2
COMMENTS
REFERENCES
Nathan J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 84, Eq. (32.64).
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Michael Somos, Introduction to Ramanujan theta functions, 2019.
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions.
FORMULA
Expansion of (1 + a(q) - 2*a(q^2)) / 6 = (1 - b(q)^2 / b(q^2)) / 6 in powers of q where a(), b() are cubic AGM theta functions.
Expansion of (1 - eta(q)^6 * eta(q^6) / (eta(q^2)^3 * eta(q^3)^2)) / 6 in powers of q.
Moebius transform is period 6 sequence [ 1, -3, 0, 3, -1, 0, ...].
a(n) is multiplicative and a(2^e) = (3(-1)^e-1)/2, a(3^e) = 1, a(p^e) = e+1 if p == 1 (mod 6), a(p^e) = (1+(-1)^e)/2 if p == 5 (mod 6).
a(3*n) = a(4*n) = a(n). a(6*n + 5) = 0.
G.f.: (1 - Product_{k>0} (1 + x^(3k)) / (1 + x^k)^3 * (1 - x^k)^3 / (1 - x^(3*k))) / 6 = Sum_{k>0} -(-x)^k / (1 + x^k + x^(2*k)).
G.f.: Sum_{k>0} x^(3*k-2) / (1 + x^(3*k-2)) - x^(3*k-1) / (1 + x^(3*k-1)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 0. - Amiram Eldar, Nov 23 2023
EXAMPLE
G.f. = q - 2*q^2 + q^3 + q^4 - 2*q^6 + 2*q^7 - 2*q^8 + q^9 + q^12 + 2*q^13 + ...
MATHEMATICA
a[ n_] := If[ n < 1, 0, -DivisorSum[ n, (-1)^(n/#) JacobiSymbol[ -3, #] &]]; (* Michael Somos, Feb 19 2015 *)
PROG
(PARI) {a(n) = if( n<1, 0, -sumdiv(n, d, (-1)^(n/d) * kronecker(-3, d)))};
(PARI) {a(n) = if( n<1, 0, sumdiv(n, d, (2+(-1)^d) * kronecker(-3, d)))};
(PARI) {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( (1 - eta(x + A)^6 * eta(x^6 + A) / (eta(x^2 + A)^3 * eta(x^3 + A)^2)) / 6, n))};
(PARI) {a(n) = if( n<1, 0, direuler(p=2, n, if(p==2, (1 - 2*X) / (1 - X^2), 1 / ((1-X) * (1 - kronecker(-3, p)*X))))[n])};
(PARI) {a(n) = my(A, p, e); if( n<1, 0, A = factor(n); prod(k=1, matsize(A)[1], [p, e] = A[k, ]; if(p==2, (3*(-1)^e - 1) / 2, p==3, 1, p%6==1, e+1, 1-e%2 )))};
CROSSREFS
KEYWORD
sign,easy,mult
AUTHOR
Michael Somos, Sep 15 2006
STATUS
approved