Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #11 Mar 30 2015 16:46:43
%S 17,107,137,347,1013,1433,1613,3767,4337,8623,25633,31114073
%N Primes without "9" as a digit that remain prime when any single digit is replaced with "9".
%C No more terms < 10^13.
%H Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_591.htm">Puzzle 591</a>
%t lst = {}; n = 9; 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, 25633}]; lst
%t pr9Q[n_]:=Module[{idn=IntegerDigits[n]},FreeQ[idn,9]&&AllTrue[Table[ FromDigits[ ReplacePart[ idn,i->9]],{i,Length[idn]}],PrimeQ]]; Select[ Prime[Range[2*10^6]],pr9Q] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Mar 30 2015 *)
%Y Cf. A224319-A224321. Subsequence of A038617.
%K base,more,nonn
%O 1,1
%A _Arkadiusz Wesolowski_, Apr 03 2013