A140791
First occurrence of prime gap 10*n.
Original entry on oeis.org
139, 887, 4297, 19333, 31907, 43331, 173359, 542603, 404851, 396733, 1468277, 1895359, 5518687, 7621259, 13626257, 33803689, 27915737, 17051707, 142414669, 378043979, 20831323, 47326693, 607010093, 391995431, 387096133, 944192807
Offset: 1
- J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 139, pp 47, Ellipses, Paris 2008.
A058193
Smallest prime p such that there is a gap of 6n between p and the next prime.
Original entry on oeis.org
23, 199, 523, 1669, 4297, 9551, 16141, 28229, 35617, 43331, 162143, 31397, 188029, 461717, 404851, 360653, 1444309, 2238823, 492113, 1895359, 1671781, 1357201, 3826019, 11981443, 13626257, 17983717, 39175217, 37305713, 52721113
Offset: 1
d = 72 appears after 31397, while smaller d = 54, 60, 66 come later, following primes 35617, 43331, 162143, respectively.
-
Module[{nn=32*10^5,prs,gps},prs=Prime[Range[nn]];gps=Differences[prs];Table[SelectFirst[Thread[{Most[prs],gps}],#[[2]]==6n&],{n,30}]][[;;,1]] (* Harvey P. Dale, Mar 03 2025 *)
-
a(n) = {p=3; q = nextprime(p+1); while((q-p) != 6*n, p = q; q = nextprime(q+1)); p;} \\ Michel Marcus, Mar 12 2016
A062529
Smallest prime p such that there is a gap of 2^n between p and the next prime.
Original entry on oeis.org
2, 3, 7, 89, 1831, 5591, 89689, 3851459, 1872851947, 1999066711391, 22790428875364879
Offset: 0
a(2)=7 because 7 and 11 are consecutive primes with difference 2^2=4.
a(3)=89 because 89 and 97 are consecutive primes with difference 2^3=8.
-
f[n_] := Block[{k = 1}, While[Prime[k + 1] != n + Prime[k], k++ ]; Prime[k]]; Do[ Print[ f[2^n]], {n, 0, 10}] (* Robert G. Wilson v, Jan 13 2005 *)
-
import sympy
n=0
while n>=0:
p=2
while sympy.nextprime(p)-p!=(2**n):
p=sympy.nextprime(p)
print(p)
n=n+1
p=sympy.nextprime(p)
## Abhiram R Devesh, Aug 09 2014
A381510
Smaller of two consecutive primes p and q, both ending with 7, such that q - p = 10n, or -1 if no such primes exist.
Original entry on oeis.org
337, 887, 4297, 33247, 31907, 124367, 218287, 1122287, 1964987, 1313467, 1468277, 7160227, 5518687, 16525757, 13626257, 71880637, 27915737, 17051707, 394059907, 566348087, 252314747, 472865287, 1289694257, 633418787, 1588640437, 944192807, 1391048047, 7059848287
Offset: 1
a(1) = 337, because 337 and 337 + 10 = 347 are two consecutive primes with the same last digit 7 and no smaller prime has this property.
-
a(n) = my(p=7); while (!isprime(p) || ((nextprime(p+1)-p) != 10*n), p+=10); p; \\ Michel Marcus, Feb 25 2025
-
from sympy import nextprime, isprime
def A381510(n):
p = 17
while (q:=nextprime(p)):
if q-p == 10*n:
return p
p = q+9-(q+2)%10
while not isprime(p):
p += 10 # Chai Wah Wu, Mar 09 2025
A381511
Smaller of two consecutive primes p and q, both ending with 9, such that q - p = 10*n, or -1 if no such primes exist.
Original entry on oeis.org
139, 3089, 5749, 20809, 60539, 110359, 173359, 618719, 1294849, 838249, 6877109, 1895359, 11188759, 7621259, 35560009, 33803689, 124956059, 92801029, 142414669, 378043979, 229316459, 390932389, 1095750599, 995151679, 2174082649, 2603726969, 3402493709, 1997191249
Offset: 1
a(1) = 139, because 139 and 139 + 10 = 149 are two consecutive primes with the same last digit 9 and no smaller p has this property.
-
a(n) = my(p=9); while (!isprime(p) || ((nextprime(p+1)-p) != 10*n), p+=10); p; \\ Michel Marcus, Feb 25 2025
-
from sympy import isprime, nextprime
def A381511(n):
p = 19
while (q:=nextprime(p)):
if q-p == 10*n:
return p
p = q+9-(q%10)
while not isprime(p):
p += 10 # Chai Wah Wu, Mar 08 2025
Showing 1-5 of 5 results.
Comments