27659 is a semiprime that contains 7 as a digit of the number itself and also of both factors.
An algorithm to determine such semiprimes up to 40,000 is as follows:
L,digit=[],7
for n in [1..40000]:
if len(divisors(n))==4 and len(prime_factors(n))==2:
F=prime_factors(n)
if digit in n.digits():
if digit in F[0].digits() and digit in F[1].digits():
L.append(n)
print(L)
[497, 679, 749, 799, 1207, 1379, 1739, 1799, 1897, 2479, 2627, 2701, 2779, 3337, 3713, 3997, 4607, 4709, 4711, 4739, 4757, 4907, 5173, 5257, 5327, 5579, 5729, 5767, 5789, 6179, 6749, 6769, 6797, 6887, 6979, 7081, 7169, 7289, 7379, 7597, 7609, 7663, 7679, 7769, 7811, 7819, 7849, 7939, 8197, 8279, 9017, 9079, 9179, 9271, 9707, 9727, 9979, 10027, 10297, 10379, 10997, 11147, 11179, 11729, 11857, 11879, 11917, 12047, 12079, 12187, 12271, 12709, 12737, 12767, 12937, 13067, 13073, 13097, 13379, 13579, 13667, 13979, 13987, 15079, 16079, 16117, 16507, 16571, 16597, 16781, 16799, 17059, 17129, 17219, 17249, 17269, 17279, 17311, 17339, 17363, 17399, 17531, 17723, 17813, 17869, 17899, 17933, 18157, 18247, 18479, 18697, 18739, 18761, 18977, 19117, 19187, 19271, 19537, 19579, 19667, 19783, 19907, 20179, 20279, 20797, 21079, 21127, 21479, 21709, 21719, 21743, 21797, 21971, 22507, 22579, 22733, 22799, 22879, 22897, 23597, 23701, 23927, 24637, 24997, 25007, 25279, 25697, 25709, 25711, 25739, 25879, 25907, 25937, 26057, 26173, 26179, 26287, 26327, 26579, 26707, 26791, 26837, 27119, 27121, 27139, 27149, 27161, 27229, 27319, 27343, 27349, 27413, 27419, 27491, 27499, 27589, 27629, 27659, 27667, 27769, 27787, 27829, 28157, 28187, 28997, 29257, 29467, 29597, 29779, 29897, 30079, 30379, 30749, 30779, 30967, 31709, 31739, 31807, 32179, 32447, 32711, 32753, 32947, 33047, 33157, 33257, 33719, 33779, 33793, 34097, 34417, 34577, 34733, 34769, 34967, 35179, 35297, 35479, 35579, 35749, 35767, 35779, 35927, 36197, 36379, 36763, 37043, 37079, 37127, 37129, 37319, 37429, 37459, 37519, 37709, 37841, 37849, 37909, 37919, 37949, 38257, 38297, 38473, 38837, 38879, 39271, 39547, 39907, 39977]
The algorithm can be adapted to search for other digits.
27659 is a cyclic and Duffinian number.
27659 can be rendered as a digit equation as follows:
2 + 7 ^ (6 - 5) = 9
No attachments