OFFSET
1,3
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
Expansion of q * d/dq a(q) / 6 where a() is a cubic AGM theta function.
a(n) is multiplicative with a(3^e) = 3^e, a(p^e) = (e+1) * p^e if p == 1 (mod 3), a(p^e) = (1 + (-1)^e) / 2 * p^e if p == 2 (mod 3).
G.f.: (-1/2) * Sum_{u, v in Z} u*v * x^(u*u + u*v + v*v) = Sum_{k in Z} (3*k + 1) * x^(3*k + 1) / (1 - x^(3*k + 1))^2.
a(3*n + 2) = a(4*n + 2) = 0. a(3*n) = a(4*n) = a(n). - Michael Somos, Nov 10 2013
a(n) = n * A002324(n).
Sum_{k=1..n} a(k) ~ c * n^2, where c = Pi/(6*sqrt(3)) = 0.302299... . - Amiram Eldar, Oct 13 2022
EXAMPLE
G.f. = q + 3*q^3 + 4*q^4 + 14*q^7 + 9*q^9 + 12*q^12 + 26*q^13 + 16*q^16 + ...
MATHEMATICA
a[ n_] := If[ n < 1, 0, n Sum[ JacobiSymbol[ d, 3], {d, Divisors @n}]]; (* Michael Somos, Nov 10 2013 *)
PROG
(PARI) {a(n) = if( n<1, 0, n * sumdiv( n, d, (d%3==1) - (d%3==2)))};
(PARI) {a(n) = my(A, p, e); if( n<1, 0, A=factor(n); n * prod(k=1, matsize(A)[1], [p, e] = A[k, ]; if( p==3, 1, p%3==1, e+1, 1-e%2 )))};
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Michael Somos, Jun 14 2007
STATUS
approved