OFFSET
0,2
COMMENTS
Number of integer solutions (x, y) 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)].
LINKS
Jianing Song, Table of n, a(n) for n = 0..10000
N. J. A. Sloane et al., Binary Quadratic Forms and OEIS.
FORMULA
G.f.: 1 + 2 * Sum_{k>0} Kronecker(-163, k) * x^k / (1 - x^k).
a(n) = 2 * A318983(n) unless n = 0.
a(0) = 1, a(n) = 2 * b(n) for n > 0, where b() is multiplicative with b(163^e) = 1, b(p^e) = (1 + (-1)^e) / 2 if Kronecker(-163, p) = -1, b(p^e) = e + 1 if Kronecker(-163, p) = 1.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=0..m} a(k) = 2*Pi/sqrt(163) = 0.49213705... . - Amiram Eldar, Dec 16 2023
EXAMPLE
G.f. = 1 + 2*x + 2*x^4 + 2*x^9 + 2*x^16 + 2*x^25 + 2*x^36 + 4*x^41 + 4*x^43 + 4*x^47 + 2*x^49 + 4*x^53 + 4*x^61 + 2*x^64 + 4*x^71 + ...
MATHEMATICA
Join[{1}, a[n_]:=If[n<0, 0, DivisorSum[n, KroneckerSymbol[-163, #] &]];
2 Table[a[n], {n, 1, 110}]] (* Vincenzo Librandi, Sep 10 2018 *)
PROG
(PARI) a(n) = if(n, 2*sumdiv(n, d, kronecker(-163, d)), 1)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jianing Song, Sep 06 2018
STATUS
approved