OFFSET
1,1
COMMENTS
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
114217 is in the sequence since deleting any two of the three 1's gives 4217 and 1427, both of which are prime.
131371 is not in the sequence since deleting the two 3's gives 1171, which is prime, but deleting two of the three 1's gives 3371, 3137, and 1337, the last one of which is not prime.
PROG
(Python)
from sympy import isprime
from itertools import combinations as C
def ok(n):
if n<100 or not isprime(n) or len(s:=str(n))==len(set(s)): return False
return all(isprime(int(t)) for i, j in C(range(len(s)), 2) if s[i]==s[j] and (t:=s[:i]+s[i+1:j]+s[j+1:])!="")
print([k for k in range(1800) if ok(k)]) # Michael S. Branicky, Nov 25 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Enrique Navarrete, Nov 25 2024
STATUS
approved