A378415 Primes with repeated digits that remain prime when any two of the same-valued digits are deleted.
113, 131, 151, 211, 223, 227, 233, 277, 311, 337, 353, 373, 443, 557, 577, 599, 727, 733, 757, 773, 883, 887, 929, 997, 1009, 1013, 1021, 1031, 1051, 1103, 1117, 1123, 1129, 1153, 1171, 1213, 1223, 1229, 1231, 1291, 1373, 1399, 1447, 1471, 1531, 1553, 1559, 1663, 1667, 1669, 1733, 1777
Offset: 1
Examples
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.
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Programs
-
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
Comments