OFFSET
1,4
COMMENTS
REFERENCES
Nathan J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 85, Eq. (32.66).
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..10000
Michael Somos, Introduction to Ramanujan theta functions.
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions.
FORMULA
a(n) is multiplicative with a(2^e) = 3 - 2^(e+1), a(3^e) = 1, a(p^e) = (p^(e+1) - 1) / (p-1) if p>3.
G.f.: Sum_{k>0} k * (-x)^k / (1 - x^k) * Kronecker(9, k) = ((theta_3(-x) * theta_3(-x^3))^2 - 1) / 4.
Dirichlet g.f.: (1 - 1/2^(s-2)) * (1 - 1/3^(s-1)) * zeta(s-1) * zeta(s). - Amiram Eldar, Sep 12 2023
EXAMPLE
G.f. = x - x^2 + x^3 - 5*x^4 + 6*x^5 - x^6 + 8*x^7 - 13*x^8 + x^9 - 6*x^10 + ...
MATHEMATICA
a[ n_] := SeriesCoefficient[ (1 - (EllipticTheta[ 4, 0, q] EllipticTheta[ 4, 0, q^3])^2) / 4, {q, 0, n}]; (* Michael Somos, Nov 11 2015 *)
a[ n_] := SeriesCoefficient[ (1 - (QPochhammer[ q] QPochhammer[ q^3])^4 / (QPochhammer[ q^2] QPochhammer[ q^6])^2) / 4, {q, 0, n}]; (* Michael Somos, Nov 11 2015 *)
a[ n_] := If[ n < 1, 0, Sum[ d {0, 1, -1, 0, -1, 1}[[Mod[ d, 6] + 1]], {d, Divisors @ n}]]; (* Michael Somos, Nov 11 2015 *)
a[ n_] := If[ n < 1, 0, Sum[ n/d {6, 1, -3, -2, -3, 1}[[Mod[ d, 6] + 1]], {d, Divisors @ n}]]; (* Michael Somos, Nov 11 2015 *)
PROG
(PARI) {a(n) = if( n<1, 0, sumdiv(n, d, d*((abs(d%6-3) == 2) - (abs(d%6-3) == 1))))};
(PARI) {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( (1 - (eta(x + A) * eta(x^3 + A))^4 / (eta(x^2 + A) * eta(x^6 + A))^2) / 4, 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 - p^(e+1), p==3, 1, (p^(e+1) - 1) / (p-1) )))};
CROSSREFS
KEYWORD
sign,easy,mult
AUTHOR
Michael Somos, Jul 30 2007
STATUS
approved