A247098 Smallest prime p that generates n different primes if it is inserted into p itself.
2, 109, 131, 10289, 12197, 1227797, 101636629, 118561139, 10596073217, 89466662147, 37898818253
Offset: 0
Examples
a(0) = 2 is prime but concat(2,2) = 22 is not. a(1) = 109 is prime and also concat(1,109,09) = 110909. a(2) = 131 is prime. Again, concat(13,131,1) = 131311 is prime and also concat(1,131,31) = 113131. a(5) = 1227797 and the five primes that are generated are: 12277912277977, 12271227797797, 12212277977797, 12122779727797, 11227797227797.
Programs
-
Maple
P:=proc(q) local a,b,i,j,k,n,t: print(2); for j from 1 to q do n:=2: for k from 1 to q do n:=nextprime(n): b:=length(n): t:=0: for i from 1 to b-1 do if isprime((trunc(n/10^i)*10^b+n)*10^i+(n mod 10^i)) then t:=t+1; fi; od; if t=j then print(n); break; fi; od; od; end: P(10^9);
Extensions
a(8)-a(10) from Chai Wah Wu, Jul 01 2019
Comments