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!)
A032691 Exactly 1 digit from {1,2,3,4,5,6,7,8,9} can precede a term to form a prime. 1

%I #15 Apr 06 2020 10:27:08

%S 89,107,139,141,169,189,223,249,267,313,379,383,403,453,497,587,589,

%T 633,667,751,757,763,799,859,893,899,913,959,961,977,979,981,983,989,

%U 991,1003,1007,1009,1041,1049,1063,1067,1087,1093,1107,1109,1123,1127

%N Exactly 1 digit from {1,2,3,4,5,6,7,8,9} can precede a term to form a prime.

%H Daniel Starodubtsev, <a href="/A032691/b032691.txt">Table of n, a(n) for n = 1..10000</a>

%e For term 1127, we find only '9'1127 to be prime.

%t aQ[n_] := Total@Boole@PrimeQ[Table[FromDigits[Prepend[IntegerDigits[n], i]], {i,9}]] == 1; Select[Range[1130], aQ[#]&] (* _Jayanta Basu_, Jun 03 2013 *)

%o (Python)

%o from sympy import isprime

%o print([i for i in range(1000) if [isprime(int(j + str(i))) for j in '123456789'].count(True) == 1]) # _Daniel Starodubtsev_, Apr 06 2020

%Y Cf. A088602.

%K nonn,base

%O 1,1

%A _Patrick De Geest_, May 15 1998

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 May 13 00:07 EDT 2024. Contains 372497 sequences. (Running on oeis4.)