OFFSET
1,1
COMMENTS
No more terms < 10^13.
LINKS
Carlos Rivera, Puzzle 591
MATHEMATICA
lst = {}; n = 3; Do[If[PrimeQ[p], i = IntegerDigits[p]; If[FreeQ[i, n], t = 0; s = IntegerLength[p]; Do[If[PrimeQ@FromDigits@Insert[Drop[i, {d}], n, d], t++, Break[]], {d, s}]; If[t == s, AppendTo[lst, p]]]], {p, 86269}]; lst
p3Q[n_]:=Module[{idn=IntegerDigits[n]}, FreeQ[idn, 3] && AllTrue[ FromDigits/@ Table[ReplacePart[idn, i->3], {i, IntegerLength[n]}], PrimeQ]]; Select[Prime[Range[10^6]], p3Q] (* The program uses the function AllTrue from Mathematica version 10 *) (* Harvey P. Dale, Aug 20 2014 *)
CROSSREFS
KEYWORD
base,more,nonn
AUTHOR
Arkadiusz Wesolowski, Apr 03 2013
STATUS
approved