This site is supported by donations to The OEIS Foundation.



Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A000928 Irregular primes: p is regular if and only if the numerators of the Bernoulli numbers B_2, B_4, ..., B_{p-3} (A000367) are not divisible by p.
(Formerly M5260 N2292)
37, 59, 67, 101, 103, 131, 149, 157, 233, 257, 263, 271, 283, 293, 307, 311, 347, 353, 379, 389, 401, 409, 421, 433, 461, 463, 467, 491, 523, 541, 547, 557, 577, 587, 593, 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 (list; graph; refs; listen; history; text; internal format)



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

Jensen proved in 1915 that there are infinitely many irregular primes. It is not known if there are infinitely many regular primes.

"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]


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.

Z. I. Borevich and I. R. Shafarevich, Number Theory. Academic Press, NY, 1966, pp. 377, 425-430 (but there are errors in the tables).

R. E. Crandall, Mathematica for the Sciences, Addison-Wesley Publishing Co., Redwood City, CA, 1991, pp. 248-255.

J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 59, p. 21, Ellipses, Paris 2008.

H. M. Edwards, Fermat's Last Theorem, Springer, 1977, see p. 244.

Jensen, K. L. "Om talteoretiske Egenskaber ved de Bernoulliske Tal." Nyt Tidskrift für Math. Afdeling B 28 (1915), pp. 73-83.

W. Johnson, On the vanishing of the Iwasawa invariant {mu}_p for p < 8000, Math. Comp., 27 (1973), 387-396 (points out that 1381, 1597, 1663, 1877 were omitted from earlier lists).

W. Johnson, Irregular prime divisors of the Bernoulli numbers, Math. Comp. 28 (1974), 653-657.

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

F. Luca, A. Pizarro-Madariaga, C. Pomerance, On the counting function of irregular primes, https://math.dartmouth.edu/~carlp/irreg.pdf, 2014.

J. Neukirch, Algebraic Number Theory, Springer, 1999, p. 38.

P. Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 257.

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

L. C. Washington, Introduction to Cyclotomic Fields, Springer, p. 350.


T. D. Noe, Table of n, a(n) for n = 1..10000

Abiessu, Irregular prime

C. Banderier, Nombres premiers reguliers

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.

J. P. Buhler, R. E. Crandall and R. W. Sompolski, Irregular primes to one million, Math. Comp. 59 no 200 (1992) 717-722.

Joe P. Buhler and David Harvey, Irregular primes to 163 million

Joe P. Buhler and David Harvey, Irregular primes to 163 million

C. K. Caldwell, The Prime Glossary, Regular prime

C. K. Caldwell, the top twenty, Irregular Primes

V. A. Demyanenko, Irregular prime number

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

B. C. Kellner, On Irregular Prime Power Divisors of the Bernoulli Numbers, Math. Comp. 75 (2006) PII S0025-5718(06)01887-4

D. H. Lehmer et al., An Application Of High-Speed Computing To Fermat's Last Theorem

C. Lin and L. Zhipeng, On Bernoulli numbers and its properties

Peter Luschny, The Computation of Irregular Primes. [From Peter Luschny, Apr 20 2009]

H. S. Vandiver, Note On The Divisors Of The Numerators Of Bernoulli's Numbers

H. S. Vandiver, Summary Of Results And Proofs Concerning Fermat's Last Theorem

H. S. Vandiver, Summary Of Results And Proofs Concerning Fermat's Last Theorem

H. S. Vandiver, Summary Of Results And Proofs Concerning Fermat's Last Theorem

H. S. Vandiver, Summary Of Results And Proofs On Fermat's Last Theorem

H. S. Vandiver, Summary Of Results And Proofs On Fermat's Last Theorem

H. S. Vandiver, Summary Of Results And Proofs On Fermat's Last Theorem

H. S. Vandiver, Examination Of Methods Of Attack On The Second Case Of Fermat's Last Theorem

S. S. Wagstaff, Jr, The Irregular Primes to 125000, Math. Comp. 32 no 142 (1978) 583-592

Eric Weisstein's World of Mathematics, Irregular Prime

Eric Weisstein's World of Mathematics, Integer Sequence Primes

Index entries for sequences related to Bernoulli numbers.

Bernoulli numbers, irregularity index of primes


A000928_list := proc(len)

local ab, m, F, p, maxp; F := {};

for m from 2 by 2 to len do

   p := nextprime(m+1);

   ab := abs(bernoulli(m));

   maxp := min(ab, len);

   while p <= maxp do

      if ab mod p = 0

      then F := F union {p} fi;

      p := nextprime(p);



sort(convert(F, list)) end:

A000928_list(1000); # Peter Luschny, Apr 25 2011


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


(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 */


Cf. A007703, A061576.

Cf. A091887 (irregularity index of the n-th irregular prime).

Sequence in context: A127023 A109166 A090798 * A073276 A105460 A141851

Adjacent sequences:  A000925 A000926 A000927 * A000929 A000930 A000931




N. J. A. Sloane


Johnson (1973) gives a list up to 8000.



Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified November 25 20:18 EST 2014. Contains 250009 sequences.