Function Repository Resource:

HeegnerPrime

Source Notebook

Convert integer tuples into Heegner field primes when applicable

Contributed by: Ed Pegg Jr

ResourceFunction["HeegnerPrime"][{a,b},h]

converts tuple {a,b} into a prime number for field when applicable.

Details

The Heegner numbers are 1, 2, 3, 7, 11, 19, 43, 67 and 163.
Numbers within a Heegner field such as have a unique factorization.

Examples

Basic Examples (3) 

Show the Heegner primes generated by tuple {1,2}:

In[1]:=
Grid[{#, ResourceFunction["HeegnerPrime"][{1, 2}, #]} & /@ {1, 2, 3, 7, 11, 19, 43, 67, 163}]
Out[1]=

Tuples with a common divisor do not have corresponding Heegner primes:

In[2]:=
unprime = Select[Subsets[Range[9], {2}], GCD @@ # > 1 &]
Out[2]=

Applying HeegnerPrime to these tuples gives Null:

In[3]:=
ResourceFunction["HeegnerPrime"][#, 2] & /@ unprime
Out[3]=

Generate some Eisenstein primes from the field :

In[4]:=
eisenstein = Select[ResourceFunction["HeegnerPrime"][#, 3] & /@ Tuples[Range[-19, 19], {2}], Norm[#] <= Sqrt[317] &];
Short[eisenstein]
Out[5]=

Show these in the complex plane:

In[6]:=
Graphics[RegularPolygon[ReIm[#], {1/2, \[Pi]/2}, 6] & /@ eisenstein]
Out[6]=

Neat Examples (3) 

The tuple {19,30} generates all Heegner primes, except the corresponding Gaussian prime:

In[7]:=
Grid[{#, ResourceFunction["HeegnerPrime"][{19, 30}, #]} & /@ {1, 2, 3,
    7, 11, 19, 43, 67, 163}]
Out[7]=

Generate some Gaussian primes from the field :

In[8]:=
gaussian = Select[ResourceFunction["HeegnerPrime"][#, 1] & /@ Tuples[Range[-30, 30], {2}], Norm[#] <= Sqrt[700] &];
Short[gaussian]
Out[9]=

Show these in the complex plane:

In[10]:=
Graphics[Disk[ReIm[#], .5] & /@ gaussian]
Out[10]=

Show some Kleinian primes from the field :

In[11]:=
kleinian = Select[ResourceFunction["HeegnerPrime"][#, 7] & /@ Tuples[Range[-23, 23], {2}], Norm[#] <= Sqrt[540] &];
Graphics[Disk[ReIm[#], .5] & /@ kleinian]
Out[11]=

Version History

  • 1.0.0 – 02 March 2021

License Information