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!)
A240678 Primes p such that p*10+k is prime for exactly one value of the digit k. 4
11, 29, 41, 47, 71, 79, 83, 131, 137, 139, 151, 163, 173, 181, 191, 227, 257, 263, 277, 281, 293, 307, 311, 313, 359, 383, 449, 491, 503, 509, 557, 563, 569, 577, 587, 593, 601, 617, 647, 659, 661, 677, 683, 719, 739, 743, 751, 809, 821, 827, 857, 877, 881 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
11 is in the sequence because 113 is prime, but 111, 117 and 119 are not prime.
MATHEMATICA
Select[Prime[Range[200]], Total[Boole[PrimeQ[10 #+{1, 3, 7, 9}]]]==1&] (* Harvey P. Dale, Apr 19 2019 *)
PROG
(PARI) forprime(p=2, 1500, t=0; forstep(k=1, 9, 2, if(isprime(p*10+k), t++)); if(t==1, print1(p, ", ")))
(Python)
from sympy import isprime, primerange
def ok(p): return sum(1 for k in [1, 3, 7, 9] if isprime(p*10+k)) == 1
def aupto(limit): return [p for p in primerange(1, limit+1) if ok(p)]
print(aupto(881)) # Michael S. Branicky, Nov 29 2021
CROSSREFS
Sequence in context: A211191 A353043 A350420 * A087693 A106017 A343418
KEYWORD
nonn,base
AUTHOR
Colin Barker, Apr 10 2014
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 April 25 10:51 EDT 2024. Contains 371967 sequences. (Running on oeis4.)