Class Number

Author

Eric W. Weisstein
May 18, 2004

This notebook downloaded from http://mathworld.wolfram.com/notebooks/NumberTheory/ClassNumber.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/ClassNumber.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Class Numbers h(-d) for d=1, 2, …

Off[ClassNumber::"baddisc"]

class=Select[{#,ClassNumber[-#]}&/@Range[100],FreeQ[#,ClassNumber]&]

Take[#,15]&/@Transpose[class]

Computation

doesn't always work since cannot be gauranteed to find minimal solution

S=Select[Table[If[FundamentalDiscriminantQ[n]==True,n],{n,-1000,1000}],FreeQ[#,Null]&];

ClassNumber1[m_]:=Piecewise[{
{-(1/(2Log[FundamentalUnit[m]]))(∑_(k=1)^(m-1))JacobiSymbol[m,k]Log[Sin[((π k)/m)]], m >0}, 
{-((w[m])/(2Abs[m]))(∑_(k=1)^(Abs[m]-1))JacobiSymbol[m,k]k, m<0}
}]

ClassNumber2[m_]:=Piecewise[{
{-(1/(2NumberFieldRegulator[Sqrt[m]]))(∑_(k=1)^(m-1))JacobiSymbol[m,k]Log[Sin[((π k)/m)]], m >0}, {-((w[m])/(2Abs[m]))(∑_(k=1)^(Abs[m]-1))JacobiSymbol[m,k]k, m<0}
}]

Select[Range[100],!IntegerQ[Sqrt[#]]&&Chop[N[2Log[FundamentalUnit[#]]-2NumberFieldRegulator[Sqrt[#]],1000]]=!=0&]

(l1=N[Table[NumberFieldClassNumber[Sqrt[d]]-ClassNumber1[d],{d,S}],50]//Chop)//Union//Timing

(l2=N[Table[NumberFieldClassNumber[Sqrt[d]]-ClassNumber2[d],{d,S}],50]//Chop)//Union//Timing

Lists of Numbers d Having Class Numbers h(-d) from 1–25

Timing[classnumbers=ClassNumber[-#]&/@Range[100000] /._ClassNumber->0;]

Append[classnumbers,ClassNumber[-#]&/@Range[100001,110000]/._ClassNumber->0;];

Length[classnumbers]

Max[classnumbers]

l=Flatten[Position[classnumbers,#]]&/@Range[25]

Length/@l

Pre-Computed

Union[ClassNumber/@-classNumberList[#]]&/@Range[25]

Table[Length[classNumberList[n]]==Length[l[[n]]],{n,25}]

Table[Complement[l[[n]],classNumberList[n]],{n,25}]

Table[Complement[classNumberList[n],l[[n]]],{n,25}]

ClassNumber[-111763]

ClassNumberList but no ClassNumber

c1=Length[ClassList[#]]&/@Range[-1,-100,-1]

c2=ClassNumber/@Range[-1,-100,-1]/._ClassNumber->0

c1-c2

Class Numbers h(d) for d=1, 2, …

Off[ClassNumber::"baddisc"]

class=Select[{#,ClassNumber[#]}&/@Range[100],FreeQ[#,ClassNumber]&]

Take[#,15]&/@Transpose[class]

Last[Transpose[class]]

A003658={1,5,8,12,13,17,21,24,28,29,33,37,40,41,44,53,56,57,60,61,65,69,73,76,77,85,88,89,92,93,97,101,104,105,109,113,120,124,129,133,136,137,140,141,145,149,152,156,157,161,165,168,172,173,177,181,184,185,188,193};

Lists of Numbers d Having Small Class Numbers h(d)

Off[ClassNumber::"baddisc"]
Timing[classnumbers=ClassNumber/@Range[10^5];]

A003652={1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,2,1,2,1,1,1,1,2,1,1,1,1,1,1,2,2,1,1,2,1,1,1,2,1,2,1,4,1,1,2,1,1,2,2,1,1,1,1,1,2,1,1,1,1,2,2,1,1,1,2,2,3,2,1,1,1,1,1,1,1,3,2,2,1,1,2,1,2,1,1,2,1,2,1,2,1,2,1,3,1,3,4,1,1,1,1,1,2};

c=DeleteCases[ClassNumber/@Range[350],ClassNumber[_]]

A003652==Take[c,105]

Smallest Number with Class Number n

smallest=DeleteCases[First/@Split[Sort[MapIndexed[{#1,#2[[1]]}&,classnumbers]],First[#1]==First[#2]&],{ClassNumber[_],_}]

Last/@Take[smallest,Position[-Subtract@@@Partition[First/@smallest,2,1],_?(#>1&),{1},1][[1,1]]]

Class Number 1

c1=Position[ClassNumber/@Range[100],1,{1}]//Flatten

A003658[[1+Take[Flatten[Position[A003652,1,{1}]],20]]]

Select[Position[ClassNumber/@Range[100],1,{1}]//Flatten,SquareFreeQ]

Class Number >1

cgt1=Position[ClassNumber/@Range[500],_?(#>1&),{1}]//Flatten

Class Number 2

c2=Take[Position[classnumbers,2,{1}]//Flatten,200]

A003658[[1+Take[Flatten[Position[A003652,2,{1}]],13]]]

A035120={40,60,65,85,104,105,120,136,140,145,156,165,168,185,204,205,220,221,229,232,257,264,265,273,280,285,296,305,312,316,321,328,345,348,357,364,365,377,380,385,401,408,424,429,440,444,445,456,460,465,469,473};

Complement[A035120,c2]

ClassNumber[145]

Complement[c2,d2]

Class Number 3

c3=Position[classnumbers,3,{1}]//Flatten

Class Number 4

c4=Position[classnumbers,4,{1}]//Flatten

Class Number 5

c5=Position[classnumbers,5,{1}]//Flatten