OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
filter:= proc(n) local i; isprime(n) and numboccur(true, [seq(isprime(i+10*n+i*10^(2+ilog10(n))), i=[1, 3, 7, 9])]) >= 2 end proc:
select(filter, [2, seq(i, i=3..1000)]);
PROG
(Python)
from sympy import isprime, nextprime
def ok(p): return sum(isprime(int(c+str(p)+c)) for c in "1379") >= 2
def aupto(limit): # only test primes
alst, p = [], 2
while p <= limit:
if ok(p): alst.append(p)
p = nextprime(p)
return alst
print(aupto(1277)) #Michael S. Branicky, Feb 02 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
J. M. Bergot and Robert Israel, Feb 02 2021
STATUS
approved