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
89, 107, 139, 141, 169, 189, 223, 249, 267, 313, 379, 383, 403, 453, 497, 587, 589, 633, 667, 751, 757, 763, 799, 859, 893, 899, 913, 959, 961, 977, 979, 981, 983, 989, 991, 1003, 1007, 1009, 1041, 1049, 1063, 1067, 1087, 1093, 1107, 1109, 1123, 1127 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
For term 1127, we find only '9'1127 to be prime.
MATHEMATICA
aQ[n_] := Total@Boole@PrimeQ[Table[FromDigits[Prepend[IntegerDigits[n], i]], {i, 9}]] == 1; Select[Range[1130], aQ[#]&] (* Jayanta Basu, Jun 03 2013 *)
PROG
(Python)
from sympy import isprime
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
CROSSREFS
Cf. A088602.
Sequence in context: A033254 A215165 A157764 * A146332 A146352 A050956
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, May 15 1998
STATUS
approved

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 25 15:24 EDT 2024. Contains 373705 sequences. (Running on oeis4.)