login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A378428
Composites that become prime when any two of their digits are deleted.
0
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,1
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.
EXAMPLE
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.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Enrique Navarrete, Nov 26 2024
STATUS
approved