A354440 Digitally delicate primes where the number of digits appended on the left needed to get a prime increases.
294001, 604171, 971767, 2690201, 10564877, 104097043, 354975121, 1378229029, 1444623667, 1594371379, 3979115747, 15737262803, 22090236251, 28198307351, 35373071549, 49430022721, 67580736437, 142243533671, 659956292591, 1385321944133
Offset: 1
Examples
You can add any 1 extra digit on the left to 294001 without getting a prime but adding two digits would allow for the creation of a prime. For example 10294001 is prime but none of X294001 are. Starting at 604171 you could add 3 extra digits to the left but not 4 without being able to produce a prime number. X604171 is not prime X0604171 is not prime X00604171 is not prime however 4000604171 is a prime number For the largest one found so far X1385321944133 X01385321944133 X001385321944133 ... X000000000000000000000000000000000000000000000000000000000000000000000000001385321944133 are all composite but 900000000000000000000000000000000000000000000000000000000000000000000000000001385321944133 is prime
References
- Michael Filaseta and Jeremiah Southwick, Primes that become composite after changing an arbitrary digit, Math. Comp. (2021) Vol. 90, 979-993. doi:10.1090/mcom/3593
Crossrefs
Cf. A050249 (digitally delicate primes).
Programs
-
Java
import java.math.BigInteger; public class delicateprimes { public static void main(String[] args) { BigInteger i,reci=new BigInteger("0"); i= new BigInteger("1"); long count=0, v,rec=-1; for(long loop=1;;loop++) { i=i.nextProbablePrime(); v = delicate(i,true); if(v>rec) {count++; rec=v;reci=i;System.out.println("REC=("+reci+", "+rec+") " +loop +" "+count);} if(loop%100000==0)System.out.println("Still running, last prime seen was "+i); } } static int delicate(BigInteger a,boolean f) // Returns how many digits can be tacked on the delicate prime. f=false just tests the prime with no extra 0s { int e, length,max=200; if(!f)max=1; String num="", num2=""; if(!prime(a))return -1; for(e=0;e
0)length=e;else length = num.length(); for(int j=0;j
Extensions
Partially edited by N. J. A. Sloane, Sep 03 2022
Comments