login
a(n) = Sum_{d|n} Kronecker(-9, d).
4

%I #38 Oct 17 2022 05:41:00

%S 1,2,1,3,2,2,0,4,1,4,0,3,2,0,2,5,2,2,0,6,0,0,0,4,3,4,1,0,2,4,0,6,0,4,

%T 0,3,2,0,2,8,2,0,0,0,2,0,0,5,1,6,2,6,2,2,0,0,0,4,0,6,2,0,0,7,4,0,0,6,

%U 0,0,0,4,2,4,3,0,0,4,0,10,1,4,0,0,4,0,2,0,2,4,0,0,0,0,0,6,2,2,0,9,2,4,0,8,0

%N a(n) = Sum_{d|n} Kronecker(-9, d).

%H G. C. Greubel, <a href="/A035181/b035181.txt">Table of n, a(n) for n = 1..5000</a>

%F From _Michael Somos_, Jun 24 2011: (Start)

%F a(n) is multiplicative with a(2^e) = e + 1, a(3^e) = 1, a(p^e) = e + 1 if p == 1 (mod 4), a(p^e) = (1 + (-1)^e) / 2 if p == 3 (mod 4) and p > 3.

%F Dirichlet g.f.: zeta(s) * L(chi,s) where chi(n) = Kronecker(-9, n). Sum_{n>0} a(n) / n^s = Product_{p prime} 1 / ((1 - p^-s) * (1 - Kronecker(-9, p) * p^-s)). (End)

%F a(3*n) = a(n). a(2*n + 1) = A125079(n). a(4*n + 1) = A008441(n).

%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2*Pi/3 = 2.094395... (A019693). - _Amiram Eldar_, Oct 17 2022

%e x + 2*x^2 + x^3 + 3*x^4 + 2*x^5 + 2*x^6 + 4*x^8 + x^9 + 4*x^10 + 3*x^12 + ...

%t a[ n_] := If[ n < 1, 0, Sum[ KroneckerSymbol[ -9, d], { d, Divisors[ n]}]] (* _Michael Somos_, Jun 24 2011 *)

%o (PARI) {a(n) = if( n<1, 0, sumdiv( n, d, kronecker( -9, d)))} \\ _Michael Somos_, Jun 24 2011

%o (PARI) {a(n) = if( n<1, 0, direuler( p=2, n, 1 / ((1 - X) * (1 - kronecker( -9, p) * X))) [n])} \\ _Michael Somos_, Jun 24 2011

%o (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==2, e+1, if( p==3, 1, if( p%4==1, e+1, (1 + (-1)^e)/2))))))} \\ _Michael Somos_, Jun 24 2011

%o (PARI) A035181(n)=sumdivmult(n,d,kronecker(-9,d)) \\ _M. F. Hasler_, May 08 2018

%Y Cf. A008441, A019693, A125079.

%Y Sum_{d|n} Kronecker(k, d): A035143..A035181 (k=-47..-9, skipping numbers that are not cubefree), A035182 (k=-7), A192013 (k=-6), A035183 (k=-5), A002654 (k=-4), A002324 (k=-3), A002325 (k=-2), A035184 (k=-1), A000012 (k=0), A000005 (k=1), A035185 (k=2), A035186 (k=3), A001227 (k=4), A035187..A035229 (k=5..47, skipping numbers that are not cubefree).

%K nonn,mult

%O 1,2

%A _N. J. A. Sloane_