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.

A378428 Composites that become prime when any two of their digits are deleted.

Original entry on oeis.org

222, 225, 232, 235, 237, 252, 253, 255, 272, 273, 275, 322, 323, 325, 327, 332, 333, 335, 352, 355, 357, 372, 375, 377, 522, 525, 527, 532, 533, 535, 537, 552, 553, 555, 572, 573, 575, 722, 723, 725, 732, 735, 737, 752, 753, 755, 772, 775, 777, 1111, 1113, 1119, 1131, 1137, 1173, 1179, 1197, 1311, 1317, 1371
Offset: 1

Views

Author

Enrique Navarrete, Nov 26 2024

Keywords

Comments

Any term < 1000 has exactly three digits and all digits are prime (cf. A061371).
The repunits (cf. A002275) R_21, R_25, R_319, R_1033 and R_49083, among others, are in the sequence since R_19, R_23, R_317, R_1031 and R_49081 are prime (cf. A004023).
The corresponding sequence for primes (cf. A378081) contains only 18 terms up to 10^100.

Examples

			1371 is in the sequence since upon deleting any two digits we get 13, 71, 17, 31, 11 and 37, all of which are prime.
1313 is not in the sequence since upon deleting the two 1s we get 33, which is not prime.
		

Crossrefs

Programs

  • Mathematica
    q[n_] := Module[{d = IntegerDigits[n]}, AllTrue[FromDigits /@ Subsets[d, {Length[d] - 2}], PrimeQ]]; Select[Range[100, 1500], CompositeQ[#] && q[#] &] (* Amiram Eldar, Nov 26 2024 *)
  • Python
    from sympy import isprime
    from itertools import combinations as C
    def ok(n):
        if n < 100 or isprime(n): return False
        s = str(n)
        return all(isprime(int(t)) for i, j in C(range(len(s)), 2) if (t:=s[:i]+s[i+1:j]+s[j+1:])!="")
    print([k for k in range(1500) if ok(k)]) # Michael S. Branicky, Nov 26 2024