OFFSET
2,3
COMMENTS
The number of genera of a quadratic field is equal to the number of elements x in the form class group such that x^2 = e where e is the identity.
This is the analog of A003640 for real quadratic fields.
Not to be confused with A391426, which gives the numbers of elements that square to the identity in the *class groups* of real quadratic fields. - Jianing Song, Dec 09 2025
LINKS
Jianing Song, Table of n, a(n) for n = 2..10000
Rick L. Shepherd, Binary quadratic forms and genus theory, Master of Arts Thesis, University of North Carolina at Greensboro, 2013.
FORMULA
MATHEMATICA
2^(PrimeNu[Select[Range[2, 300], NumberFieldDiscriminant[Sqrt[#]]==#&]] - 1) (* Jean-François Alcover, Jul 25 2019 *)
PROG
(PARI) for(n=2, 1000, if(isfundamental(n), print1(2^(omega(n) - 1), ", ")))
(PARI) for(n=2, 1000, if(isfundamental(n), print1(2^#select(t->t%2==0, quadclassunit(n).cyc), ", ")))
(SageMath)
def A317989_list(len):
L = (sloane.A001221(n) for n in (1..len) if is_fundamental_discriminant(n))
return [2^(l-1) for l in L]
A317989_list(290) # Peter Luschny, Oct 15 2018
CROSSREFS
Cf. A003640 (for imaginary quadratic fields).
Sequences related to the class groups of real quadratic fields:
| Class groups | Form class groups |
-------------+-------------------------------+---------------------------------+
-------------+-------------------------------+---------------------------------+
For a list of sequences related to the class numbers of real quadratic fields, see A087048.
KEYWORD
nonn
AUTHOR
Jianing Song, Oct 03 2018
EXTENSIONS
Offset corrected by Jianing Song, Mar 31 2019
STATUS
approved
