%I #38 Mar 09 2022 10:12:57
%S 9,18,16,54,25,51,31,131,34,87,41,206,37,95,68,322,45,150,47,350,85,
%T 139,68,511,95,190,93,457,83,255,73,708,101,219,103,668,85,237,115,
%U 912,109,339,106,691,154,268,107,1365,132,345,159,770,114,427,163,1205,179,291
%N Number of negative fundamental discriminants having class number n.
%H Andy Huchala, <a href="/A046125/b046125.txt">Table of n, a(n) for n = 1..100</a> (from Watkins' paper)
%H Duncan A. Buell, <a href="http://dx.doi.org/10.1090/S0025-5718-1977-0439802-X">Small class numbers and extreme values of L-functions of quadratic fields</a>, Math. Comp., 31 (1977), 786-796.
%H M. Watkins, <a href="http://dx.doi.org/10.1090/S0025-5718-03-01517-5">Class numbers of imaginary quadratic fields</a>, Mathematics of Computation 73 (2004), pp. 907-938.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/ClassNumber.html">Class Number</a>
%H <a href="/index/Qua#quadfield">Index entries for sequences related to quadratic fields</a>
%e a(1) = 9 because the discriminants {-3,-4,-7,-8,-11,-19,-43,-67,-163} are the only ones with class number 1.
%t FundamentalDiscriminantQ[n_] := n != 1 && (Mod[n, 4] == 1 || ! Unequal[ Mod[n, 16], 8, 12]) && SquareFreeQ[n/2^IntegerExponent[n, 2]] (* via Eric E. Weisstein *);
%t k = 1; t = Table[0, {125}]; While[k < 2000001, If[ FundamentalDiscriminantQ@ -k, a = NumberFieldClassNumber@ Sqrt@ -k; If[a < 126, t[[a]]++]]; k++]; t (* _Robert G. Wilson v_ Jun 01 2011 *)
%o (PARI) lista(nn=10^7) = {my(NMAX=100, v = vector(NMAX), c); for (k=1, nn, if (isfundamental(-k), if ((c = qfbclassno(-k)) <= NMAX, v[c] ++););); v;} \\ _Michel Marcus_, Feb 17 2022
%Y Cf. A014602, A014603, A006203, A013658, A046002-A046016, A048925, A056987, A081319, A038552, A191408, A191410.
%Y Cf. A038552.
%K nonn,nice
%O 1,1
%A _Eric W. Weisstein_
%E Edited by _Robert G. Wilson v_, May 13 2003
%E Corrected and extended by _Dean Hickerson_, May 20 2003. The values were obtained by transcribing and combining data from Tables 1-3 of Buell's paper, which has information for all values of n up to 125.