OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..150
EXAMPLE
18289 is prime and also 182893, 182839, 182389, 183289, 138289, 318289.
MAPLE
filter:= proc(n) local L, d, k, M;
if not isprime(n) then return false fi;
L:= convert(n, base, 10);
d:= nops(L);
for k from 0 to d do
M:= [seq(L[i], i=1..k), 3, seq(L[i], i=k+1..d)];
if not isprime(add(M[i]*10^(i-1), i=1..d+1)) then return false fi;
od;
true
end proc;
select(filter, [seq(i, i=3..2*10^5, 2)]); # Robert Israel, Oct 09 2017
MATHEMATICA
ins@n_:=Insert[IntegerDigits@n, 3, #]&/@Range@(IntegerLength@n+1);
Cases[{#, FromDigits@#&/@ins@#}&/@ Cases[Range[11, 70000], _?PrimeQ], {_, {_?PrimeQ..}}][[All, 1]] (* Hans Rudolf Widmer, Dec 21 2023 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Aug 10 2012
STATUS
approved