OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..63 (all terms up to and including the 1 millionth prime)
EXAMPLE
59053 is prime as are 590537, 590573, 590753, 597053, 579053, and 759053.
MAPLE
A215420:=proc(q, x)
local a, b, c, d, i, n, ok;
for n from 1 to q do
a:=ithprime(n); b:=0; while a>0 do b:=b+1; a:=trunc(a/10); od;
a:=ithprime(n); ok:=1;
for i from 0 to b do
c:=a+9*10^i*trunc(a/10^i)+10^i*x; if not isprime(c) then ok:=0; break; fi;
od;
if ok=1 then print(ithprime(n)); fi;
od; end:
A215420(1000, 7);
MATHEMATICA
Select[Prime[Range[31000]], AllTrue[FromDigits/@Table[Insert[ IntegerDigits[ #], 7, n], {n, IntegerLength[#]+1}], PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 29 2020 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Aug 10 2012
STATUS
approved