cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A355879 Class number of Q(sqrt((-1)^((p-1)/2)*p)), where p = prime(n).

Original entry on oeis.org

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

Views

Author

Jianing Song, Jul 20 2022

Keywords

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.

Examples

			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.
		

Crossrefs

Programs

  • PARI
    a(n) = if(n==1, 1, my(p=prime(n)); qfbclassno(if(p%4==1, p, -p)))