%I A000928 M5260 N2292 #141 Jul 18 2026 16:20:05
%S A000928 37,59,67,101,103,131,149,157,233,257,263,271,283,293,307,311,347,353,
%T A000928 379,389,401,409,421,433,461,463,467,491,523,541,547,557,577,587,593,
%U A000928 607,613,617,619,631,647,653,659,673,677,683,691,727,751,757,761,773,797,809,811,821,827,839,877,881,887,929,953,971,1061
%N A000928 Irregular primes: primes p such that at least one of the numerators of the Bernoulli numbers B_2, B_4, ..., B_{p-3} (A000367) is divisible by p.
%C A000928 A prime is irregular if and only if the integer Sum_{j=1..p-1} cot^(r)(j*Pi/p)*cot(j*Pi/p) is divisible by p for some even r <= p-5. (See G. Almkvist 1994.) - _Peter Luschny_, Jun 24 2012
%C A000928 Jensen proved in 1915 that there are infinitely many irregular primes. It is not known if there are infinitely many regular primes.
%C A000928 "The pioneering mathematician Kummer, over the period 1847-1850, used his profound theory of cyclotomic fields to establish a certain class of primes called 'regular' primes. ... It is known that there exist an infinity of irregular primes; in fact it is a plausible conjecture that only an asymptotic fraction 1/Sqrt(e) ~ 0.6 of all primes are regular." [Ribenboim]
%C A000928 Johnson (1975) mentions "consecutive irregular prime pairs", meaning an irregular prime p such that, for some integer k <= 2*p-3, p divides the numerators of the Bernoulli numbers B_{2k} and B_{2k+2}. He gives the examples p = 491 (with k=168) and p = 587. No other examples are known. - _N. J. A. Sloane_, May 01 2021, following a suggestion from _Felix Fröhlich_.
%C A000928 An odd prime p is irregular if and only if p divides the class number of Q(zeta_p), where zeta_n = exp(2*Pi*i/n); that is, for k >= 2, p = prime(k) is irregular if and only if p divides A055513(k). For example, 37 is irregular since Q(zeta_37) has class number A055513(12) = 37. - _Jianing Song_, Sep 13 2022
%D A000928 G. Almkvist, Wilf's conjecture and a generalization, In: The Rademacher legacy to mathematics, 211-233, Contemp. Math., 166, Amer. Math. Soc., Providence, RI, 1994.
%D A000928 Z. I. Borevich and I. R. Shafarevich, Number Theory. Academic Press, NY, 1966, pp. 377, 425-430 (but there are errors in the tables).
%D A000928 R. E. Crandall, Mathematica for the Sciences, Addison-Wesley Publishing Co., Redwood City, CA, 1991, pp. 248-255.
%D A000928 J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 59, p. 21, Ellipses, Paris 2008.
%D A000928 H. M. Edwards, Fermat's Last Theorem, Springer, 1977, see p. 244.
%D A000928 J. Neukirch, Algebraic Number Theory, Springer, 1999, p. 38.
%D A000928 Paulo Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 257.
%D A000928 Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 225.
%D A000928 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D A000928 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%D A000928 L. C. Washington, Introduction to Cyclotomic Fields, Springer, p. 350.
%H A000928 T. D. Noe, Table of n, a(n) for n = 1..10000
%H A000928 Abiessu, Irregular prime
%H A000928 C. Banderier, Nombres premiers réguliers (in French). [Cached copy at the Wayback Machine]
%H A000928 J. P. Buhler, R. E. Crandall, R. Ernvall et al., Irregular primes and cyclotomic invariants to 12 Million,J. Symbolic Computation 31 (2001) 89-96.
%H A000928 J. P. Buhler, R. E. Crandall and R. W. Sompolski, Irregular primes to one million, Math. Comp. 59 no 200 (1992) 717-722.
%H A000928 Joe P. Buhler and David Harvey, Irregular primes to 163 million.
%H A000928 Joe P. Buhler and David Harvey, Irregular primes to 163 million, arXiv:0912.2121 [math.NT], 2009.
%H A000928 C. K. Caldwell, The Prime Glossary, Regular prime
%H A000928 C. K. Caldwell, the top twenty, Irregular Primes
%H A000928 V. A. Demyanenko, Irregular prime number
%H A000928 G. Everest, A. J. van der Poorten, Y. Puri and T. Ward, Integer Sequences and Periodic Points, Journal of Integer Sequences, Vol. 5 (2002), Article 02.2.3.
%H A000928 William Hart, David Harvey and Wilson Ong, Irregular primes to two billion, Math. Comp. 86 (2017), 3031-3049. Preprint arXiv:1605.02398 [math.NT].
%H A000928 David Harvey, List of irregular pairs, 2017. Download size 557 MB.
%H A000928 Su Hu, Min-Soo Kim, Pieter Moree and Min Sha, Irregular primes with respect to Genocchi numbers and Artin's primitive root conjecture, arXiv:1809.08431 [math.NT], 2018.
%H A000928 K. L. Jensen, Om talteoretiske Egenskaber ved de Bernoulliske Tal, Nyt Tidskrift für Math. Afdeling B 28 (1915), pp. 73-83.
%H A000928 W. Johnson, On the vanishing of the Iwasawa invariant {mu}_p for p < 8000, Math. Comp., 27 (1973), 387-396 (gives a list up to 8000 and points out that 1381, 1597, 1663, 1877 were omitted from earlier lists).
%H A000928 W. Johnson, Irregular prime divisors of the Bernoulli numbers, Math. Comp. 28 (1974), 653-657.
%H A000928 W. Johnson, Irregular primes and cyclotomic invariants, Math. Comp. 29 (1975), 113-120.
%H A000928 Bernd C. Kellner, On irregular prime power divisors of the Bernoulli numbers, Math. Comp. 76 (2007), 405-441; arXiv:0409223 [math.NT], 2004.
%H A000928 D. H. Lehmer et al., An Application Of High-Speed Computing To Fermat's Last Theorem, Proc. Nat. Acad. Sci. USA, 40 (1954), 25-33 (but there are errors).
%H A000928 C. Lin and L. Zhipeng, On Bernoulli numbers and its properties, arXiv:math/0408082 [math.HO], 2004.
%H A000928 F. Luca, A. Pizarro-Madariaga and C. Pomerance, On the counting function of irregular primes, 2014.
%H A000928 Peter Luschny, The Computation of Irregular Primes. [From _Peter Luschny_, Apr 20 2009]
%H A000928 Romeo Mestrovic, On a Congruence Modulo n^3 Involving Two Consecutive Sums of Powers, Journal of Integer Sequences, Vol. 17 (2014), 14.8.4.
%H A000928 Tauno Metsänkylä, Note on the distribution of irregular primes, Annales Academiae Scientiarum Fennicae, Series A. I. Mathematica, 492, 1971.
%H A000928 H. S. Vandiver, Note On The Divisors Of The Numerators Of Bernoulli's Numbers
%H A000928 H. S. Vandiver, Summary Of Results And Proofs Concerning Fermat's Last Theorem
%H A000928 H. S. Vandiver, Summary Of Results And Proofs Concerning Fermat's Last Theorem
%H A000928 H. S. Vandiver, Summary Of Results And Proofs Concerning Fermat's Last Theorem
%H A000928 H. S. Vandiver, Summary Of Results And Proofs On Fermat's Last Theorem
%H A000928 H. S. Vandiver, Summary Of Results And Proofs On Fermat's Last Theorem
%H A000928 H. S. Vandiver, Summary Of Results And Proofs On Fermat's Last Theorem
%H A000928 H. S. Vandiver, Examination Of Methods Of Attack On The Second Case Of Fermat's Last Theorem
%H A000928 S. S. Wagstaff, Jr, The Irregular Primes to 125000, Math. Comp. 32 no 142 (1978) 583-592.
%H A000928 Eric Weisstein's World of Mathematics, Irregular Prime
%H A000928 Eric Weisstein's World of Mathematics, Integer Sequence Primes
%H A000928 Index entries for sequences related to Bernoulli numbers.
%H A000928 Bernoulli numbers, irregularity index of primes
%p A000928 A000928_list := proc(len)
%p A000928 local ab, m, F, p, maxp; F := {};
%p A000928 for m from 2 by 2 to len do
%p A000928 p := nextprime(m+1);
%p A000928 ab := abs(bernoulli(m));
%p A000928 maxp := min(ab, len);
%p A000928 while p <= maxp do
%p A000928 if ab mod p = 0
%p A000928 then F := F union {p} fi;
%p A000928 p := nextprime(p);
%p A000928 od;
%p A000928 od;
%p A000928 sort(convert(F,list)) end:
%p A000928 A000928_list(1000); # _Peter Luschny_, Apr 25 2011
%t A000928 fQ[p_] := Block[{k = 1}, While[ 2k <= p-3 && Mod[ Numerator@ BernoulliB[ 2k], p] != 0, k++]; 2k <= p-3]; Select[ Prime@ Range@ 137, fQ] (* _Robert G. Wilson v_, Jun 25 2012 *)
%t A000928 (* Alternative: *)
%t A000928 Select[Prime[Range[200]],MemberQ[Mod[Numerator[BernoulliB[2*Range[(#-1)/ 2]]], #],0]&] (* _Harvey P. Dale_, Mar 02 2018 *)
%o A000928 (PARI) a(n)=local(p);if(n<1,0,p=a(n-1)+(n==1);while(p=nextprime(p+2), forstep(i=2,p-3,2,if(numerator(bernfrac(i))%p==0,break(2))));p) /* _Michael Somos_, Feb 04 2004 */
%o A000928 (PARI) is(n)=isprime(n) && !primeisregular(n) \\ _Charles R Greathouse IV_, Jan 23 2026
%o A000928 (Python)
%o A000928 from sympy import bernoulli, primerange
%o A000928 def ok(n):
%o A000928 k = 1
%o A000928 while 2*k <= n - 3 and bernoulli(2*k).numerator % n:
%o A000928 k+=1
%o A000928 return 2*k <= n - 3
%o A000928 print([n for n in primerange(2, 1101) if ok(n)]) # _Indranil Ghosh_, Jun 27 2017, after _Robert G. Wilson v_
%Y A000928 Cf. A007703, A061576.
%Y A000928 Cf. A091887 (irregularity index of the n-th irregular prime).
%K A000928 nonn,nice,easy
%O A000928 1,1
%A A000928 _N. J. A. Sloane_