login
This site is supported by donations to The OEIS Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A007703 Regular primes.
(Formerly M2411)
11

%I M2411

%S 3,5,7,11,13,17,19,23,29,31,41,43,47,53,61,71,73,79,83,89,97,107,109,

%T 113,127,137,139,151,163,167,173,179,181,191,193,197,199,211,223,227,

%U 229,239,241,251,269,277,281,313,317,331,337,349,359,367,373,383,397,419,431

%N Regular primes.

%C A prime 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.

%D Z. I. Borevich and I. R. Shafarevich, Number Theory. Academic Press, NY, 1966, pp. 425-430.

%D H. M. Edwards, Fermat's Last Theorem, Springer, 1977.

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

%H T. D. Noe, <a href="/A007703/b007703.txt">Table of n, a(n) for n = 1..10000</a>

%H C. K. Caldwell, The Prime Glossary, <a href="http://primes.utm.edu/glossary/page.php/Regular.html">Regular prime</a>

%H K. Conrad, <a href="http://www.math.uconn.edu/~kconrad/blurbs/fltreg.pdf">Fermat's Last Theorem For Regular Primes</a>

%H F. Luca, A. Pizarro-Madariaga, C. Pomerance, <a href="https://math.dartmouth.edu/~carlp/irreg.pdf">On the counting function of irregular primes</a>, 2014.

%H O. A. Ivanova, <a href="http://eom.springer.de/R/r080800.htm">Regular prime number</a>

%H D. Jao, PlanetMath.org, <a href="http://planetmath.org/encyclopedia/RegularPrime.html">Regular prime</a>

%H A. L. Robledo, PlanetMath.org, <a href="http://planetmath.org/encyclopedia/ExampleOfRegularPrime.html">examples of regular primes</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/RegularPrime.html">Regular Prime</a>

%H <a href="/index/Be#Bernoulli">Bernoulli numbers, irregularity index of primes</a>

%t s = {}; Do[p = Prime@n; k = 1; While[2k <= p - 3 && Mod[Numerator@BernoulliB[2k], p] != 0, k++ ]; If[2k > p - 3, AppendTo[s, p]], {n, 2, 80}]; s (* _Robert G. Wilson v_ Sep 20 2006 *)

%o (PARI) is(p)=forstep(k=2,p-3,2,if(numerator(bernfrac(k))%p==0, return(0))); isprime(p) \\ _Charles R Greathouse IV_, Feb 25 2014

%o (Python)

%o from sympy import prime, isprime, bernoulli

%o from fractions import Fraction

%o def ok(n):

%o for k in xrange(2, n - 2, 2):

%o if Fraction(str(bernoulli(k))).numerator%n==0: return 0

%o return isprime(n)

%o print [n for n in xrange(3, 501) if ok(n)] # _Indranil Ghosh_, Jun 27 2017, after _Charles R Greathouse IV_

%Y Cf. A000928 (irregular primes) and A061576 for further references.

%K nonn,nice

%O 1,1

%A _N. J. A. Sloane_, _Simon Plouffe_

%E Corrected by _Gerard Schildberger_, Jun 01 2004

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 16 15:31 EST 2019. Contains 319195 sequences. (Running on oeis4.)