A343637
10^n + a(n) is the least (n+1)-digit prime member of a prime septuplet, or a(n) = 0 if no such number exists.
Original entry on oeis.org
0, 1, 0, 4639, 78799, 65701, 68701, 1900501, 24066079, 12986041, 5758291, 63497419, 126795511, 85452991, 693558301, 1539113749, 1265954431, 959416471, 8269773991, 620669029, 9487038451, 1024481911, 8285411491, 21631441411, 15981152869, 23307738889, 32551582849, 114332503171
Offset: 0
a(0) = 0 because no single-digit prime starts a prime septuplet.
a(1) = 1 because 10^1 + 1 = 11 = A022009(1) is the first member of the smallest (2-digit) prime septuplet {11, 13, 17, 19, 23, 29, 31} (of the first type).
a(2) = 0 because there is no prime septuplet starting with a 3-digit prime.
a(3) = 4639 because 10^3 + a(3) = 5639 = A022010(1) is the first 4-digit initial member of a prime septuplet, which happens to be of the second type, D = {0, 2, 8, 12, 14, 18, 20}. Similarly, 10^4 + a(4) = 88799 = A022010(2) starts the smallest 5-digit prime septuplet.
For all subsequent terms, a(n) < 10^n (conjectured), so the primes are of the form 10...0XXX where XXX = a(n).
Cf.
A022009 and
A022010 (initial members of prime septuplets of first and second type).
-
apply( {A343637(n,D=[2,6,8,12,14,18,20],X=2^6+2^14)=forprime(p=10^n, 10^(n+1), my(t=2); foreach(D, d, ispseudoprime(p+d)||(t-- && bittest(X,d))||next(2));return(p-10^n))}, [0..10]) \\ For illustration; unoptimized code, becomes slow for n >= 11.
A350826
Number of prime sextuplets with n-digit initial term (A022008).
Original entry on oeis.org
1, 1, 0, 0, 3, 0, 13, 64, 235, 1296, 7013, 41782, 253420, 1607418, 10520883, 70785653, 488096844
Offset: 1
For n = 1, p = 7 is the only 1-digit prime to be the initial term of a prime sextuplet, (7, 11, 13, 17, 19, 23), hence a(1) = 1.
For n = 2, p = 97 is the only 2-digit prime to be the initial term of a prime sextuplet, (97, 101, 103, 107, 109, 113), whence a(2) = 1.
For n = 3 and n = 4, there is no n-digit prime to be the initial term of a prime sextuplet, so a(n) = 0.
For n = 5, {16057, 19417, 43777} are the only 5-digit primes which are initial members of a prime sextuplet, therefore a(5) = 3.
Cf.
A022008 (initial members of prime sextuplets),
A033874 (10^n - precprime(10^n)).
-
apply( {A350826(n,L=10^n)=n=L\10; for(c=0,oo, L<(n=next_A022008(n)) && return(c))}, [1..8])
A343635
10^n + a(n) is the least (n+1)-digit prime member of a prime 5-tuple, or a(n) = 0 if no such number exists.
Original entry on oeis.org
4, 1, 1, 481, 5727, 1107, 8851, 18027, 5457, 408807, 57931, 358531, 274587, 256497, 6111627, 67437, 3246567, 1638811, 8224977, 11687221, 24556351, 3129657, 15602131, 571381, 23034391, 110598987, 26716321, 31722117, 39711931, 5046777, 81054327, 1346611, 44656587
Offset: 0
a(0) = 4 because {5, 7, 11, 13, 17} is the smallest prime 5-tuple and it starts with the single-digit prime 10^0 + a(0) = 5 = A022006(1).
a(1) = 1 because 10^1 + 1 = 11 = A022006(2) is the 2-digit prime to start a prime 5-tuple {11, 13, 17, 19, 23}, again of the first type.
a(2) = 1 and a(3) = 481 because 10^2 + 1 = 101 = A022006(3) and 10^3 + 481 = 1481 = A022006(4) are the smallest 3-digit, resp. 4-digit, initial members of a prime 5-tuple, both again of the first type.
a(4) = 5727 because 10^4 + 5727 = 15727 = A022007(6) is the smallest 5-digit initial member of a prime 5-tuple, now of the second type.
It appears that for all n > 0, a(n) < 10^n, so that the primes are of the form 10...0XXX where XXX = a(n) and 0...0 stands for a string of zero or more digits 0.
Cf.
A022006 and
A022007 (initial members of prime 5-tuples of first and second type).
-
apply( {A343635(n,q=[1..4],i=0)=forprime(p=10^n,, (q[1+i]+12==q[i++]=p) && return(p-12-10^n); i>3 && i=0)}, [0..15]) \\ Shorter but slightly slower (?)
-
apply( {A343635(n, i=ispseudoprime, q)=forprime(p=10^n,, i(p+12) && i(p+6) && (p+6 > q=nextprime(p+2)) && i(q+6) && return(p-10^n))}, [0..15])
-
from sympy import nextprime
def a(n):
p = nextprime(10**n)
q = nextprime(p); r = nextprime(q); s = nextprime(r); t = nextprime(s)
while p < 10**(n+1):
if t - p == 12: return p - 10**n
p, q, r, s, t = q, r, s, t, nextprime(t)
return 0
print([a(n) for n in range(14)]) # Michael S. Branicky, Jul 24 2021
Showing 1-3 of 3 results.
Comments