This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A329648 #36 Feb 16 2025 08:33:58 %S A329648 1,2,7,8,11,8,30,8,19,40,69,48,9,0,93,32,70,36,156,80,43,88,235,32, %T A329648 102,104,220,224,177,0,126,32,67,272,497,0,50,152,395,160,249,336,522, %U A329648 176,182,0,760,192,0,0,515,624,321,72,888,0,230,696,1190,480,246,0,635 %N A329648 Let D = A014601(n) be the n-th positive integer congruent to 0 or 3 mod 4, then a(n) = b(D) := -Sum_{i=1..D} Kronecker(-D,i)*i, where Kronecker(-D,i) is the Kronecker symbol. %C A329648 Note that {Kronecker(D,i)} is a Dirichlet character mod |D| if and only if D == 0, 1 (mod 4). %C A329648 We have the identity: -Sum_{i=1..D} Kronecker(-D,i)*i^2 = D*b(D). Proof: -Sum_{i=1..D} Kronecker(-D,i)*i^2 = -(1/2)*Sum_{i=1..D} (Kronecker(-D,i)*i^2+Kronecker(-D,D-i)*(D-i)^2) = -(1/2)*Sum_{i=1..D} (Kronecker(-D,i)*(i^2-(D-i)^2)) = -(1/2)*Sum_{i=1..D} (Kronecker(-D,i)*(2*D*i-D^2) = D*b(D) + (D^2/2)*(Sum_{i=1..D} Kronecker(-D,i)) = D*b(D). %H A329648 Jianing Song, <a href="/A329648/b329648.txt">Table of n, a(n) for n = 1..10000</a> %H A329648 Jianing Song, <a href="/A329648/a329648_2.pdf">Notes on the value of -(1/D)*(Sum_{i=1..D} Kronecker(-D,i)*i)</a> %H A329648 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/ClassNumber.html">Class Number</a> %H A329648 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/DirichletL-Series.html">Dirichlet L-Series</a> %F A329648 Let c(D) = b(D)/D = -(1/D)*(Sum_{i=1..D} Kronecker(-D,i)*i). Let -d be the unique fundamental discriminant (i.e., d is in A003657) such that D/d is a square, then c(D) = 2*h(-d)/w(-d) * Product_{primes p|D} (1-Kronecker(-d,p)), where h(-d) is the class number of K = Q[sqrt(-d)], w(-d) is the number of elements in K whose norms are 1 (w(-d) = 6 if d = 3, 4 if d = 4 and 2 if d > 4). This can be seen as the generalization of the well known class number formula: if -d is a fundamental discriminant then c(d) = 2*h(-d)/w(-d). See my notes in the Links section. %F A329648 b(D) = 0 if and only if there exists a prime p being a factor of D such that if we write D = p^e * s, gcd(p,s) = 1, then e is even and Kronecker(-s,p) = 1; if p = 2, then s == 7 (mod 8). %F A329648 If -d is a fundamental discriminant, then Sum_{k>=1} Kronecker(-d,k)/k = 2*Pi*h(-d)/(sqrt(d)*w(-d)) = Pi*c(d)/sqrt(d) = Pi*b(d)/d^(3/2). Here Sum_{k>=1} Kronecker(-d,k)/k is the value of the Dirichlet L-series of a non-principal character modulo d at s=1. %e A329648 For n = 7, D = 15, b(15) = -(1 + 2 + 4 - 7 + 8 - 11 - 13 - 14) = 30, which is equal to 15*h(-15). Note that the class number of Q[sqrt(-15)] is 2. %e A329648 For D < 100, b(D) = 0 for D = 28 = 7*2^2, 60 = 15*2^2, 72 = 8*3^2, 92 = 23*2^2, 99 = 11*3^2 and 100 = 4*5^2, where -7, -15, -8, -23, -11 and -4 are fundamental discriminants. Note that Kronecker(-7,2) = Kronecker(-15,2) = Kronecker(-8,3) = Kronecker(-23,2) = Kronecker(-11,3) = 1. On the other hand, for D = 213444 = 4*231^2, we have c(213444) = 2*h(-4)/w(-4) * (1-Kronecker(-4,3))*(1-Kronecker(-4,7))*(1-Kronecker(-4,11)) = 4 and b(213444) = 213444*4 = 853776. %t A329648 b[n_] = -Sum[KroneckerSymbol[n, i]*i, {i, 1, n}]; %t A329648 a[n_] = b[2 n + Mod[n, 2]] %o A329648 (PARI) b(n) = -sum(i=1, n, kronecker(-n,i)*i) %o A329648 a(n) = b(2*n + (n%2)) %Y A329648 Cf. A014601, A003657, A001221. %K A329648 nonn %O A329648 1,2 %A A329648 _Jianing Song_, Nov 18 2019