login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A191411
Class number, k, of n; i.e., imaginary quadratic fields negated Q(sqrt(-n))=k, or 0 if n is not squarefree (A005117).
0
1, 1, 1, 0, 2, 2, 1, 0, 0, 2, 1, 0, 2, 4, 2, 0, 4, 0, 1, 0, 4, 2, 3, 0, 0, 6, 0, 0, 6, 4, 3, 0, 4, 4, 2, 0, 2, 6, 4, 0, 8, 4, 1, 0, 0, 4, 5, 0, 0, 0, 2, 0, 6, 0, 4, 0, 4, 2, 3, 0, 6, 8, 0, 0, 8, 8, 1, 0, 8, 4, 7, 0, 4, 10, 0, 0, 8, 4, 5, 0, 0, 4, 3, 0, 4, 10, 6, 0, 12, 0, 2, 0, 4, 8, 8, 0, 4, 0, 0, 0, 14, 4, 5, 0, 8
OFFSET
1,5
MATHEMATICA
f[n_] := If[! SquareFreeQ@ n, 0, NumberFieldClassNumber@Sqrt@ -n]; Array[f, 105]
PROG
(PARI) a(n) = if (! issquarefree(n), 0, qfbclassno(-n*if((-n)%4>1, 4, 1))); \\ Michel Marcus, Jul 08 2015
CROSSREFS
a(n)= 0: A013929; a(n)= 1: A003173; a(n)= 2: A005847; a(n)= 3: A006203; a(n)= 4: A046085; a(n)= 5: A046002; a(n)= 6: A055109; a(n)= 7: A046004; a(n)= 8: A055110; a(n)= 9: A046006; a(n)=10: A055111; a(n)=11: A046008; a(n)=12: n/a;
a(n)=13: A046010; a(n)=14: n/a; a(n)=15: A046012; a(n)=16: n/a; a(n)=17: A046014; a(n)=18: n/a; a(n)=19: A046016;
a(n)=20: n/a; a(n)=21: A046018; a(n)=22: n/a;
a(n)=23: A046020; a(n)=24: n/a; a(n)=25: A056987; etc.
Cf. A000924 (without the zeros).
Sequence in context: A160806 A344447 A287385 * A133418 A181169 A029390
KEYWORD
easy,nonn
AUTHOR
Robert G. Wilson v, Jun 01 2011
STATUS
approved