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 #39 Apr 03 2023 10:36:12
%S 212159,294001,505447,584141,595631,604171,872897,971767,1062599,
%T 1203623,1282529,1293671,1524181,1566691,1702357,1830661,2017963,
%U 2474431,2690201,3085553,3326489,3716213,3964169,4103917,4134953,4173921,4310617,4376703
%N Numbers ending in 1, 3, 7 or 9 such that changing any one decimal digit produces a composite number.
%C Union of A050249 and A143641.
%C This sequence is infinite because Terence Tao proved that sequence A050249 is infinite.
%H Arkadiusz Wesolowski, <a href="/A186694/b186694.txt">Table of n, a(n) for n = 1..1500</a>
%H Chris Caldwell, The Prime Glossary, <a href="https://t5k.org/glossary/xpage/WeaklyPrime.html">Weakly prime</a>
%H G. L. Honaker, Jr. and Chris Caldwell, <a href="https://t5k.org/curios/cpage/9645.html">Prime Curios! 212159</a>
%H G. L. Honaker, Jr. and Chris Caldwell, <a href="https://t5k.org/curios/cpage/16579.html">Prime Curios! 17171...58369 (1000-digits)</a>
%H Terence Tao, <a href="http://arxiv.org/abs/0802.3361">A remark on primality testing and decimal expansions</a>, Journal of the Australian Mathematical Society 91:3 (2011), pp. 405-413.
%t primeProof[n_] := Module[{d, e, isPP, num}, d=IntegerDigits[n]; isPP=True; Do[e=d; e[[i]]=j; num=FromDigits[e]; If[num != n && PrimeQ[num], isPP=False; Break[]], {i, Length[d]}, {j, 0, 9}]; isPP]; Select[Range[1, 1000000, 2], Mod[#, 5] > 0 && primeProof[#] &] (* _T. D. Noe_, Feb 26 2011 *)
%Y Cf. A050249, A045572, A143641.
%K base,nonn
%O 1,1
%A _Arkadiusz Wesolowski_, Feb 25 2011