OFFSET
1,1
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
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
KEYWORD
nonn,base
AUTHOR
Colin Barker, Apr 10 2014
STATUS
approved