The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A155762 Prime numbers p such that prepending any single decimal digit to p does not produce a prime. 3

%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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 6 23:24 EDT 2024. Contains 373135 sequences. (Running on oeis4.)