A174220 Number of regular primes between p^2 and p*q, where p and q are consecutive primes.
1, 2, 2, 4, 3, 8, 2, 6, 8, 5, 22, 15, 7, 10, 23, 21, 6, 26, 19, 7, 34, 18, 33, 38, 27, 18, 27, 12, 30, 95, 29, 59, 14, 79, 11, 59, 58, 37, 61, 59, 23, 96, 22, 43, 19, 131, 143, 50, 31, 55, 84, 30, 134, 86, 88, 77, 24, 87, 60, 28, 162, 227, 73, 37, 55, 248, 104, 174, 39, 65, 104, 143
Offset: 1
Keywords
Examples
Take any pair of consecutive primes. Say the first (2,3). Square the first term, and then take the product of the two to obtain an interval (4,6). Within this interval, there is 1 regular prime, which is 5. Hence the very first term of the sequence above is 1. Similarly, the second term, 2, refers to the two regular primes 11 and 13.
Links
- C. K. Caldwell, The Prime Glossary, Regular prime
- D. Jao, Regular prime, PlanetMath.org.
Programs
-
PARI
has(p)=forstep(k=2, p-3, 2, if(numerator(bernfrac(k))%p==0, return(0))); 1 a(n,p=prime(n))=my(q=nextprime(p+1),s); forprime(r=p^2,p*q, if(has(r), s++)); s \\ Charles R Greathouse IV, Nov 02 2022
Formula
Used the table of irregular primes by T.D. Noe in A000928 to extract a longer list of regular primes from a list of odd primes.
Extensions
New name from Charles R Greathouse IV, Nov 02 2022
Comments