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.

Showing 1-6 of 6 results.

A002143 Class numbers h(-p) where p runs through the primes p == 3 (mod 4).

Original entry on oeis.org

1, 1, 1, 1, 3, 3, 1, 5, 3, 1, 7, 5, 3, 5, 3, 5, 5, 3, 7, 1, 11, 5, 13, 9, 3, 7, 5, 15, 7, 13, 11, 3, 3, 19, 3, 5, 19, 9, 3, 17, 9, 21, 15, 5, 7, 7, 25, 7, 9, 3, 21, 5, 3, 9, 5, 7, 25, 13, 5, 13, 3, 23, 11, 5, 5, 31, 13, 5, 21, 15, 5, 7, 9, 7, 33, 7, 21, 3, 29, 3, 31, 19, 5, 11, 15, 27, 17, 13
Offset: 1

Views

Author

Keywords

Comments

a(n) = h(-A002145(n)).
Same as (1/p)*(sum of quadratic nonresidues mod p in (0,p) - sum of quadratic residues mod p in (0,p)), for prime p == 3 (mod 4) if p > 3. (See Davenport's book and the first Mathematica program.) - Jonathan Sondow, Oct 27 2011
Conjecture: For any prime p > 3 with p == 3 (mod 8), we have 2*h(-p)*sqrt(p) = Sum_{k=1..(p-1)/2} csc(2*Pi*k^2/p). - Zhi-Wei Sun, Aug 06 2019

Examples

			E.g., a(4) = 1 is the class number of -19, the 4th prime == 3 mod 4.
a(5) = -(1/23)*sum(n=1..22, n*(n|23)) = -(1/23)*(1 + 2 + 3 + 4 - 5 + 6 - 7 + 8 + 9 - 10 - 11 + 12 + 13 - 14 - 15 + 16 - 17 + 18 - 19 - 20 - 21 - 22) = 69/23 = 3. - _Jonathan Sondow_, Oct 27 2011
		

References

  • H. Davenport, Multiplicative Number Theory, Graduate Texts in Math. 74, 2nd ed., Springer, 1980, p. 51.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A002145 (primes p), A002146, A101435.

Programs

  • Mathematica
    Cases[ Table[ With[ {p = Prime[n]}, If[ Mod[p, 4] == 3, -(1/p)*Sum[ a*JacobiSymbol[a, p], {a, 1, p - 1}]]], {n, 1, 100}], Integer] (* _Jonathan Sondow, Oct 27 2011 *)
    p = Prime[n]; If[Mod[p, 4] == 3, NumberFieldClassNumber[Sqrt[-p]]] (* Jonathan Sondow, Feb 24 2012 *)
  • PARI
    forprime(p=3, 1e3, if(p%4==3, print1(qfbclassno(-p)", "))) \\ Charles R Greathouse IV, May 08 2011

Formula

h(-p) = 1 + 2*sum(0 <= n <= (1/2)*sqrt(p/3)-1, d(n^2+n+(p+1)/4, [2*n+1, sqrt(n^2+n+(p+1)/4)])) for prime p=3 mod 4, p>3. d(n, [a, b])=card{d: d|n and a
h(-p) = -(1/p)*sum(n=1..p-1, n*(n|p)) if p > 3, where (n|p) = +/- 1 is the Legendre symbol. - Jonathan Sondow, Oct 27 2011
h(-p) = (1/3)*sum(n=1..(p-1)/2, (n|p)) or sum(n=1..(p-1)/2, (n|p)) according as p == 3 or 7 (mod 8). - Jonathan Sondow, Feb 27 2012

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Jul 19 2002

A002147 Largest prime == 7 (mod 8) with class number 2n+1.

Original entry on oeis.org

7, 31, 127, 487, 1423, 1303, 2143, 2647, 4447, 5527, 5647, 6703, 5503, 11383, 8863, 13687, 13183, 12007, 22807, 18127, 21487, 22303, 29863, 25303, 27127
Offset: 0

Keywords

Comments

Apr 14 2008: David Broadhurst says: I computed class numbers for prime discriminants with |D| < 10^9, but stopped when the first case with |D| > 5*10^8 was observed. That factor of 2 seems to me to be a reasonable margin of error, when you look at the pattern of what is included.

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A002146.

A355876 Smallest prime p == 1 (mod 8) such that Q(sqrt(p)) has class number 2n+1.

Original entry on oeis.org

17, 257, 401, 577, 1129, 1297, 13033, 11321, 11257, 38569, 7057, 23593, 27689, 8761, 56857, 284561, 63361, 25601, 24337, 55441, 458929, 14401, 32401, 78401, 70969, 69697, 376897, 106537, 41617, 160001, 193601, 57601, 197137, 367721, 414433, 1506473, 444089, 331777, 156817
Offset: 0

Author

Jianing Song, Jul 20 2022

Keywords

Comments

It seems that a(n) < A355877(n) for most n. a(n) > A355877(n) for n = 0, 1, 6, 9, 15, 20, 35, ...

Examples

			p = 257 is the smallest prime congruent to 1 modulo 8 such that Q(sqrt(p)) has class number 3, so a(1) = 257.
		

Crossrefs

Cf. A355878.
Similar sequences: A002148 (p == 3 (mod 8)), A355877 (p == 5 (mod 8)), A002146 (p == 7 (mod 8)).

Programs

  • PARI
    a(n) = forprime(p=2, oo, if(p%8==1 && qfbclassno(p)==2*n+1, return(p)))

A355877 Smallest prime p == 5 (mod 8) such that Q(sqrt(p)) has class number 2n+1.

Original entry on oeis.org

5, 229, 1093, 2029, 7573, 12589, 8101, 13693, 54541, 18229, 75629, 91813, 59053, 65029, 72901, 146077, 127453, 199813, 169909, 209581, 439573, 189229, 197341, 324901, 378229, 596293, 430861, 352837, 712981, 1137229, 700573, 245029, 574261, 770533, 860701, 1432813, 1821877, 1092829
Offset: 0

Author

Jianing Song, Jul 20 2022

Keywords

Examples

			p = 229 is the smallest prime congruent to 5 modulo 8 such that Q(sqrt(p)) has class number 3, so a(1) = 229.
		

Crossrefs

Cf. A355878.
Similar sequences: A355876 (p == 1 (mod 8)), A002148 (p == 3 (mod 8)), A002146 (p == 7 (mod 8)).

Programs

  • PARI
    a(n) = forprime(p=2, oo, if(p%8==5 && qfbclassno(p)==2*n+1, return(p)))

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

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)))

A060651 Smallest odd prime p such that Q(sqrt(-p)) has class number 2n+1.

Original entry on oeis.org

3, 23, 47, 71, 199, 167, 191, 239, 383, 311, 431, 647, 479, 983, 887, 719, 839, 1031, 1487, 1439, 1151, 1847, 1319, 3023, 1511, 1559, 2711, 4463, 2591, 2399, 3863, 2351, 3527, 3719, 3119, 5471, 2999, 4703, 6263, 4391, 3671, 3911, 4079, 5279, 6311, 4679
Offset: 0

Author

Robert G. Wilson v, Apr 17 2001

Keywords

Comments

Note that all such primes are congruent to 3 modulo 4.
Conjecture: a(n) = A002146(n) for all n >= 1. That is to say, A002148(n) > A002146(n) for all n >= 1. - Jianing Song, Jul 20 2022
From Jianing Song, Sep 16 2022: (Start)
Note that an imaginary quadratic field has an odd class number if and only if it is of the form Q(sqrt(-1)), Q(sqrt(-2)), or Q(sqrt(-p)) for primes p == 3 (mod 4).
It seems that for most n, the class group of Q(sqrt(-a(n))) is the cyclic group of order 2*n+1. But this is not always true. The smallest prime p such that Q(sqrt(-p)) has class number 243 is p = 29399, and the class group of Q(sqrt(-29399)) is C_3 X C_81 rather than C_243. Also, the smallest prime p such that Q(sqrt(-p)) has class number 637 is p = 149519, and the class group of Q(sqrt(-149519)) is C_7 X C_91 rather than C_637. (End)

Crossrefs

Programs

  • Mathematica
    << NumberTheory`NumberTheoryFunctions`
    a = Table[0, {101}]; Do[ c = ClassNumber[ -Prime[n] ]; If[ c < 102 && a[ [c] ] == 0, a[ [c] ] = Prime[n] ], {n, 2, 4000} ]; Table[ a[ [n] ], {n, 1, 101} ]
    a = Table[0, {101}]; Do[c = NumberFieldClassNumber[Sqrt[-Prime[n]]]; If[c < 102 && a[[c]] == 0, a[[c]] = Prime[n]], {n, 2, 4000}]; Select[ Table[a[[n]], {n, 1, 101}], Mod[#, 4] == 3 &] (* Jean-François Alcover, Jul 20 2022 *)
  • PARI
    a(n) = forprime(p=3, oo, if ((p % 4) == 3, if (qfbclassno(-p) == 2*n+1, return(p)))); \\ Michel Marcus, Jul 20 2022

Formula

a(n) = min(A002146(n), A002148(n)). - Jianing Song, Jul 20 2022

Extensions

Offset corrected by Michel Marcus, Jul 20 2022
Showing 1-6 of 6 results.