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.
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
Examples
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.
Links
- M. F. Hasler, Table of n, a(n) for n = 0..399 (terms up to a(51) from Michael S. Branicky), Aug 04 2021.
- Norman Luhn, Primzahltupel, prime k-tuple: Smallest-n-digit-prime-quintuplets, on mathematikalpha.de, 2020. Tables.
Crossrefs
Programs
-
PARI
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 (?)
-
PARI
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])
-
Python
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
Comments