A378563 Primes that remain prime if any three of their digits are deleted.
2237, 2273, 2333, 2357, 2377, 2557, 2753, 2777, 3253, 3257, 3323, 3373, 3527, 3533, 3557, 3727, 3733, 5227, 5233, 5237, 5273, 5323, 5333, 5527, 5557, 5573, 5737, 7237, 7253, 7333, 7523, 7537, 7573, 7577, 7723, 7727, 7753, 7757, 11113, 11117, 11119, 11131, 11171, 11173, 11197
Offset: 1
Examples
43117 is in the sequence since upon deleting any three digits we get 43, 31, 11, 17 and 47, all of which are prime.
Programs
-
Python
from sympy import isprime from itertools import combinations as C def ok(n): if n < 1000 or not isprime(n): return False s = str(n) return all(isprime(int(t)) for i, j, k in C(range(len(s)), 3) if (t:=s[:i]+s[i+1:j]+s[j+1:k]+s[k+1:])!="") print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Dec 01 2024
Comments