A103548 a(n) is the largest n-digit zeroless prime such that the sum of the two numbers that result from splitting a(n) between any two of its digits is a distinct prime.
89, 863, 8821, 68683, 864883, 6866683
Offset: 2
Examples
a(4) = 8821: 8 + 821 = 829, which is prime; 88 + 21 = 109, which is prime; 882 + 1 = 883, which is prime; and no larger 4-digit number has this property.
Crossrefs
Cf. A038618.
Programs
-
PARI
a(n) = {my(lds = [9,7,3,1], s = (10^n\9-1)*10); forvec(x = vector(n-1,i,[1,4]), b = s - 20*fromdigits(Vec(x)); for(j = 1, #lds, if(iscan(b + lds[j]), return(b + lds[j])))); -1}
-
PARI
iscan(n) = {if(n%3 == 0, return(0)); if(!isprime(n), return(0)); my(l = List(), lp, rp, qd = #digits(n-1)); for(i = 1, qd, rp = n % 10^i; lp = n \ 10^i; if(!isprime(rp + lp), return(0), listput(l, rp + lp))); #Set(l) == qd} \\ David A. Corneth, Aug 28 2023
Extensions
Last terms a(6) and a(7) from Hagen von Eitzen, Jun 02 2009
Comments