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 #22 May 29 2022 08:08:24
%S 2,5,149,401,509,773,809,1021,1103,1289,1301,1451,1697,1709,1747,1877,
%T 1889,2087,2389,2521,2663,3373,3511,3631,3733,3779,3821,3919,3947,
%U 3989,4003,4073,4241,4289,4339,4637,4643,4801,4931,5039,5113,5387,5417,5477
%N Prime numbers p such that prepending any single decimal digit to p does not produce a prime.
%C 149 is in the sequence, because the following numbers are all composite: 1149, 2149, 3149, 4149, 5149, 6149, 7149, 8149 and 9149.
%H Michael S. Branicky, <a href="/A155762/b155762.txt">Table of n, a(n) for n = 1..10000</a>
%t Select[Prime@Range@1000, NoneTrue[#+10^IntegerLength@#*Range@9, PrimeQ]&] (* _Hans Rudolf Widmer_, May 28 2022 *)
%o (Python)
%o from sympy import isprime, primerange
%o def ok(p): return not any(isprime(int(d+str(p))) for d in "123456789")
%o print(list(filter(isprime, primerange(2, 5500)))) # _Michael S. Branicky_, May 28 2022
%Y Cf. A119289.
%K nonn,base
%O 1,1
%A _Dmitry Kamenetsky_, Jan 26 2009