%I #22 Dec 16 2023 09:01:23
%S 1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
%T 0,1,0,0,0,0,2,0,2,0,0,0,2,0,1,0,0,0,2,0,0,0,0,0,0,0,2,0,0,1,0,0,0,0,
%U 0,0,2,0,0,0,0,0,0,0,0,0,1,0,2,0,0,0,0
%N a(n) = Sum_{d|n} Kronecker(-163, d).
%C Coefficients in expansion of Dirichlet series Product_p (1-(Kronecker(m,p)+1)*p^(-s) + Kronecker(m,p)*p^(-2s))^(-1) for m = -163.
%C Half of the number of integer solutions to x^2 + x*y + 41*y^2 = n. Also, a(n) is the number of integral elements with norm n in Q[sqrt(-163)] counted up to association.
%C Inverse Moebius transform of A011615.
%H Jianing Song, <a href="/A318983/b318983.txt">Table of n, a(n) for n = 1..10000</a>
%H N. J. A. Sloane et al., <a href="https://oeis.org/wiki/Binary_Quadratic_Forms_and_OEIS">Binary Quadratic Forms and OEIS</a>.
%F a(n) is multiplicative with a(163^e) = 1, a(p^e) = (1 + (-1)^e) / 2 if Kronecker(-163, p) = -1, a(p^e) = e + 1 if Kronecker(-163, p) = 1.
%F G.f.: Sum_{k>0} Kronecker(-163, k) * x^k / (1 - x^k).
%F A318985(n) = 2 * a(n) unless n = 0.
%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/sqrt(163) = 0.246068... . - _Amiram Eldar_, Dec 16 2023
%e G.f. = x + x^4 + x^9 + x^16 + x^25 + x^36 + 2*x^41 + 2*x^43 + 2*x^47 + x^49 + 2*x^53 + 2*x^61 + x^64 + 2*x^71 + ...
%t a[n_] := DivisorSum[n, KroneckerSymbol[-163, #] &]; Array[a, 100] (* _Amiram Eldar_, Dec 16 2023 *)
%o (PARI) a(n) = sumdiv(n, d, kronecker(-163, d))
%Y Cf. A318985.
%Y Moebius transform gives A011615.
%Y Number of integral elements with norm n in Q[sqrt(d)] counted up to association: A002324 (d=-3), A002654 (d=-4), A035182 (d=-7), A002325 (d=-8), A035179 (d=-11), A035171 (d=-19), A035147 (d=-43), A318982 (d=-67), this sequence (d=-163).
%K nonn,easy,mult
%O 1,41
%A _Jianing Song_, Sep 06 2018