login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = n times number of divisors of n of form 3m+1 - n times number of divisors of form 3m+2.
1

%I #12 Oct 13 2022 06:38:24

%S 1,0,3,4,0,0,14,0,9,0,0,12,26,0,0,16,0,0,38,0,42,0,0,0,25,0,27,56,0,0,

%T 62,0,0,0,0,36,74,0,78,0,0,0,86,0,0,0,0,48,147,0,0,104,0,0,0,0,114,0,

%U 0,0,122,0,126,64,0,0,134,0,0,0,0,0,146,0,75,152

%N a(n) = n times number of divisors of n of form 3m+1 - n times number of divisors of form 3m+2.

%C Cubic AGM theta functions: a(q) (see A004016), b(q) (A005928), c(q) (A005882).

%H Amiram Eldar, <a href="/A131099/b131099.txt">Table of n, a(n) for n = 1..10000</a>

%F Expansion of q * d/dq a(q) / 6 where a() is a cubic AGM theta function.

%F 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).

%F 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.

%F a(3*n + 2) = a(4*n + 2) = 0. a(3*n) = a(4*n) = a(n). - _Michael Somos_, Nov 10 2013

%F a(n) = n * A002324(n).

%F Sum_{k=1..n} a(k) ~ c * n^2, where c = Pi/(6*sqrt(3)) = 0.302299... . - _Amiram Eldar_, Oct 13 2022

%e G.f. = q + 3*q^3 + 4*q^4 + 14*q^7 + 9*q^9 + 12*q^12 + 26*q^13 + 16*q^16 + ...

%t a[ n_] := If[ n < 1, 0, n Sum[ JacobiSymbol[ d, 3], {d, Divisors @n}]]; (* _Michael Somos_, Nov 10 2013 *)

%o (PARI) {a(n) = if( n<1, 0, n * sumdiv( n, d, (d%3==1) - (d%3==2)))};

%o (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 )))};

%Y Cf. A002324.

%K nonn,mult

%O 1,3

%A _Michael Somos_, Jun 14 2007