({{, (RefLink[NumberFieldClassNumber, paclet:ref/NumberFieldClassNumber])[θ] 
gives the class number for the algebraic number field ℚ[θ] generated by θ.}})

OpenersPrimaryExamplesSection(Spacer1)Examples  (6)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Find the class number of the algebraic number field ℚ[(Sqrt[5])]:

NumberFieldClassNumber[Sqrt[5]]

OpenersExampleSection1(Spacer1)Scope  (2)

Class number of complex and real quadratic fields:

NumberFieldClassNumber[Sqrt[-151]]

NumberFieldClassNumber[Sqrt[3263123]]

(RefLink[NumberFieldClassNumber, paclet:ref/NumberFieldClassNumber]) automatically threads over lists:

NumberFieldClassNumber[{Sqrt[-71], 2^(1/3)}]

OpenersExampleSection3(Spacer1)Applications  (1)

Value of the Dirichlet L-functions at 1 for the real primitive character modulo -11:

Pi NumberFieldClassNumber[Sqrt[-11]]/Sqrt[11]

OpenersExampleSection4(Spacer1)Properties & Relations  (1)

Number of representations of 19 as a sum of 3 squares:

12(1-JacobiSymbol[-19,2]) NumberFieldClassNumber[Sqrt[-19]]

SquaresR[3, 19]

OpenersExampleSection5(Spacer1)Possible Issues  (1)

Class number for some algebraic number fields may not be yet available:

NumberFieldClassNumber[Sqrt[1+Sqrt[2]]]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[NumberFieldDiscriminant, paclet:ref/NumberFieldDiscriminant])  ▪  (RefLink[NumberFieldRegulator, paclet:ref/NumberFieldRegulator])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Integer and Number Theoretic Functions, paclet:tutorial/IntegerAndNumberTheoreticalFunctions])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Algebraic Number Theory, paclet:guide/AlgebraicNumberTheory])}})}})