login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A354440 Digitally delicate primes where the number of digits appended on the left needed to get a prime increases. 0
294001, 604171, 971767, 2690201, 10564877, 104097043, 354975121, 1378229029, 1444623667, 1594371379, 3979115747, 15737262803, 22090236251, 28198307351, 35373071549, 49430022721, 67580736437, 142243533671, 659956292591, 1385321944133 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Digitally delicate primes (A050249) are primes such that if any single digit is changed the new number is composite. This sequence gives the smallest such prime that needs more digits added to the left to get to another prime. While this list is not complete it has been shown to be finite. A widely digitally delicate prime is known which never becomes prime regardless of the number of extra digits.
294001 can add 1
604171 can add 3
971767 can add 4
2690201 can add 5
10564877 can add 6
104097043 can add 7
354975121 can add 10
1378229029 can add 11
1444623667 can add 12
1594371379 can add 14
3979115747 can add 15
15737262803 can add 16
22090236251 can add 20
28198307351 can add 26
35373071549 can add 27
49430022721 can add 28
67580736437 can add 30
142243533671 can add 47
659956292591 can add 59
1385321944133 can add 76
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
LINKS
EXAMPLE
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
PROG
(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<max; e++) //While widely digitally delicate primes do exist, this needs to have a stop point
{
num=zeros(e)+a.toString();
if(e>0)length=e; else length = num.length();
for(int j=0; j<length; j++)
{
for(int k=0; k<=9; k++)
{
num2=num.substring(0, j)+k+num.substring(j+1);
if(num2.contentEquals(num))continue;
if(prime(new BigInteger(num2))) {return e-1; }
}
}
}
return e-1;
}
static boolean prime(BigInteger a)
{
return a.isProbablePrime(100);
}
static String zeros(int n)
{
StringBuffer temp=new StringBuffer("");
for(int i=0; i<n; i++)temp=temp.append("0");
return temp.toString();
}
}
CROSSREFS
Cf. A050249 (digitally delicate primes).
Sequence in context: A318787 A158124 A050249 * A224973 A328664 A328935
KEYWORD
nonn,base,more
AUTHOR
Jason Rodgers, May 29 2022
EXTENSIONS
Partially edited by N. J. A. Sloane, Sep 03 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 3 19:22 EDT 2024. Contains 372222 sequences. (Running on oeis4.)