login
A355879
Class number of Q(sqrt((-1)^((p-1)/2)*p)), where p = prime(n).
1
1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 5, 1, 3, 1, 1, 7, 1, 5, 3, 1, 1, 1, 5, 3, 1, 1, 5, 5, 1, 3, 1, 7, 1, 1, 11, 1, 5, 1, 13, 1, 1, 9, 3, 7, 5, 3, 1, 15, 1, 7, 3, 13, 1, 11, 1, 1, 3, 1, 3, 19, 1, 1, 3, 1, 5, 1, 1, 19, 9, 1, 3, 17, 1, 1, 5, 1, 9, 1, 21, 1, 15, 5, 1, 1, 1, 7
OFFSET
1,9
COMMENTS
For n > 1, class number of the unique quadratic field with discriminant +-p, p = prime(n).
a(1) corresponds to Q(sqrt(2*i)) = Q(1+i) = Q(i).
All terms are odd.
EXAMPLE
prime(9) = 23, Q(sqrt(-23)) has class number 3, so a(9) = 3.
prime(15) = 47, Q(sqrt(-47)) has class number 5, so a(15) = 5.
prime(20) = 71, Q(sqrt(-71)) has class number 7, so a(20) = 7.
prime(50) = 229, Q(sqrt(229)) has class number 3, so a(50) = 3.
PROG
(PARI) a(n) = if(n==1, 1, my(p=prime(n)); qfbclassno(if(p%4==1, p, -p)))
CROSSREFS
Sequence in context: A353063 A274613 A066975 * A291634 A098877 A225212
KEYWORD
nonn
AUTHOR
Jianing Song, Jul 20 2022
STATUS
approved