cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A378415 Primes with repeated digits that remain prime when any two of the same-valued digits are deleted.

Original entry on oeis.org

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

Views

Author

Enrique Navarrete, Nov 25 2024

Keywords

Comments

Relaxed version of A378081, which contains only 18 terms up to 10^100.
Not a superset of A378081 since this sequence does not contain 257 and 523.

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.
		

Crossrefs

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