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.

A378081 Primes that remain prime if any two of their digits are deleted.

Original entry on oeis.org

223, 227, 233, 257, 277, 337, 353, 373, 523, 557, 577, 727, 733, 757, 773, 1117, 1171, 4111
Offset: 1

Views

Author

Enrique Navarrete, Nov 15 2024

Keywords

Comments

Any term >= 1000 must have its last three digits be from {1, 3, 7, 9}. - Michael S. Branicky, Nov 15 2024
From David A. Corneth, Nov 16 2024: (Start)
Any term < 1000 has exactly three digits and all digits prime (cf. A019546).
Any term >= 1000 is of the form 100*p + r where p is prime and r has only digits coprime to 10 and 11 <= r <= 99.
Also digits in any term >= 1000 are from {1, 4, 7} and at most one digit from {2, 5, 8}. Else at least one of the numbers resulting from removing any two digits is a multiple of 3 and not 3 itself so not prime.
a(19) >= 10^9 if it exists. (End)
a(19) >= 10^10 if it exists. - Michael S. Branicky, Nov 16 2024
a(19) >= 10^100 if it exists. - David A. Corneth, Nov 18 2024

Examples

			From _David A. Corneth_, Nov 18 2024: (Start)
4111 is a term since 4111 is prime and removing any to digits from it gives 11 or 11 or 11 or 41 or 41 or 41 and all of those are prime.
No term can end in 12587 as by removing we can (among other numbers) obtain 287, 127, 128, 157, 158, 257 and 587 which are respectively 0 through 6 (mod 7) (all possible residue classes mod 7). So by prepending more digits to 12587 we can always get a multiple of 7 (that is larger than 7) after removing some two digits. (End)
		

Crossrefs

Programs

  • Mathematica
    q[n_] := Module[{d = IntegerDigits[n], nd}, nd = Length[d]; nd > 2 && AllTrue[FromDigits /@ Map[d[[#]] &, Subsets[Range[nd], {nd - 2}]], PrimeQ]]; Select[Prime[Range[600]], q] (* Amiram Eldar, Nov 16 2024 *)
  • PARI
    \\ See Corneth link
  • Python
    from sympy import isprime
    from itertools import combinations as C
    def ok(n):
        if n < 100 or not 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(1, 10**6) if ok(k)]) # Michael S. Branicky, Nov 15 2024