OFFSET
1,1
COMMENTS
Only numbers greater than 1000 are considered, since all 3-digit primes are trivial members.
A211684 is a similar sequence that doesn't allow leading zeros in substrings.
EXAMPLE
1011 belongs to the sequence as both 101 and 011=11 are primes.
MAPLE
q:= n-> (s-> andmap(isprime@parse, [seq(s[j-2..j], j=3..length(s))]))(""||n):
select(q, [$1000..2300])[]; # Alois P. Heinz, Jun 29 2021
MATHEMATICA
Select[Range[1000, 3000], PrimeQ[FromDigits[Take[IntegerDigits[#], -3]]] && PrimeQ[FromDigits[Take[IntegerDigits[#], 3]]] &]
PROG
(Python)
from sympy import isprime
def ok(n):
if n <= 1000: return False
s = str(n)
return all(isprime(int(s[i:i+3])) for i in range(len(s)-2))
print(list(filter(ok, range(1001, 2300)))) # Michael S. Branicky, Jun 29 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Tanya Khovanova, Jun 29 2021
STATUS
approved