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.

Showing 1-4 of 4 results.

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

A378563 Primes that remain prime if any three of their digits are deleted.

Original entry on oeis.org

2237, 2273, 2333, 2357, 2377, 2557, 2753, 2777, 3253, 3257, 3323, 3373, 3527, 3533, 3557, 3727, 3733, 5227, 5233, 5237, 5273, 5323, 5333, 5527, 5557, 5573, 5737, 7237, 7253, 7333, 7523, 7537, 7573, 7577, 7723, 7727, 7753, 7757, 11113, 11117, 11119, 11131, 11171, 11173, 11197
Offset: 1

Views

Author

Enrique Navarrete, Nov 30 2024

Keywords

Comments

Any 4-digit term has all digits prime (cf. A019546).
The corresponding sequence for two digits deleted contains only 18 terms up to 10^100 (Cf. A378081).
Any term >= 10000 must have its last four digits be from {1, 3, 7, 9}. - Michael S. Branicky, Dec 01 2024

Examples

			43117 is in the sequence since upon deleting any three digits we get 43, 31, 11, 17 and 47, all of which are prime.
		

Crossrefs

Programs

  • Python
    from sympy import isprime
    from itertools import combinations as C
    def ok(n):
        if n < 1000 or not isprime(n): return False
        s = str(n)
        return all(isprime(int(t)) for i, j, k in C(range(len(s)), 3) if (t:=s[:i]+s[i+1:j]+s[j+1:k]+s[k+1:])!="")
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Dec 01 2024

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

A378697 Table T(n,k), 0 < n and 0 <= k < n, where the n-th row contains the smallest n-digit primes that remain prime even if any k of their digits are deleted, or -1 if no such prime exists.

Original entry on oeis.org

2, 11, 23, 103, 113, 223, 2237, 10007, 10193, -1, 11113, 22273, 100003, 166931, -1, -1, 111119, 222323, 1000003, 1367777, -1, -1, -1, 1111711, 2222273, 10000019, 13334117, -1, -1, -1, -1, 11111117, 22222223, 100000007, 110499911, -1, -1, -1, -1, -1, 111111113, 222222227
Offset: 1

Views

Author

Jean-Marc Rebert, Dec 04 2024

Keywords

Examples

			Row 2 contains 11 and 23 because 11 remains prime if any 0 of its digits are deleted, and 23 remains prime if any 1 of its digits is deleted, and no lesser 2-digit prime has this property.
Table begins:
  2;
  11, 23;
  103, 113, 223;
  1009, 1013, 1117, 2237;
  10007, 10193, -1, 11113, 22273;
  100003, 166931, -1, -1, 111119, 222323;
  1000003, 1367777, -1, -1, -1, 1111711, 2222273;
  10000019, 13334117, -1, -1, -1, -1, 11111117, 22222223;
  ...
		

Crossrefs

Showing 1-4 of 4 results.