Showing posts with label insertion. Show all posts
Showing posts with label insertion. Show all posts

Friday, 28 August 2026

Inserting Digits

28269 is a composite number with the interesting property that if we insert the digit 7 in any position, the result is a prime number. Thus 728269, 278269, 287269, 282769, 282679 and 282697 are all prime. Such numbers belong to OEIS A216168 (permalink):


A216168: composite numbers and 1 which yield a prime whenever a 7 is inserted anywhere in them, including at the beginning or end.

Up to 40000, the members of the sequence are:

1, 9, 27, 33, 39, 57, 87, 159, 177, 187, 603, 717, 753, 949, 1257, 1707, 2277, 2367, 4317, 4623, 4779, 4797, 5773, 6757, 6777, 7017, 7471, 7479, 7747, 7797, 7813, 7977, 8797, 9777, 9987, 10777, 11757, 17679, 28269, 28437, 29779, 34177, 34771

There is an associated OEIS sequence for inserting the digit 1. It is OEIS A216165 (permalink):


A216165: composite numbers and 1 which yield a prime whenever a 1 is inserted anywhere in them, including at the beginning or end.

The initial members of this sequence are:

1, 49, 63, 81, 91, 99, 117, 123, 213, 231, 279, 319, 427, 459, 621, 697, 721, 801, 951, 987, 1113, 1131, 1261, 1821, 1939, 2101, 2149, 2211, 2517, 2611, 3151, 3219, 4011, 4411, 4887, 5031, 5361, 6231, 6487, 7011, 7209, 8671, 9141, 9801, 10051, 10161, 10281, 10603, 10921, 11121, 11127, 11211, 11641, 11767, 11791, 11869, 12997, 13111, 13143, 14311, 16911, 17023, 17541, 18081, 18619, 19677, 21039, 21711, 23289, 25197, 29169, 29971, 31111, 34777, 38559

Here is the associated OEIS A216166 sequence for inserting a 3 (permalink).


A216166: composite numbers and 1 which yield a prime whenever a 3 is inserted anywhere in them (including at the beginning or end).

The initial members of this sequence are:

1, 121, 343, 361, 533, 637, 793, 889, 943, 1183, 3013, 3223, 3353, 3403, 3757, 3827, 3893, 4313, 4543, 4963, 8653, 10423, 14257, 20339, 23083, 23419, 30917, 33031, 33101, 33323, 33433, 33701, 33821, 34333, 34393, 35453, 36437, 36533, 39137, 39247

Here is the result for inserting the digit 9. I wasn't able to locate the OEIS sequence (permalink).

91, 209, 539, 749, 923, 931, 1079, 1139, 2717, 2959, 3971, 3979, 4559, 5629, 6401, 6739, 8213, 8491, 8939, 9607, 11089, 11227, 13943, 14269, 14371, 17381, 17689, 24059, 25517, 25937, 25949, 29087, 29197, 29419, 30989, 31691

There are various variations on this theme. Once can look at numbers, both composite and prime, or one can look at only primes. The insertion can be between digits but not at the beginning and end. The insertion can be only at the beginning and end etc. Let's consider one of these: OEIS A216167.


A216167: composite numbers which yield a prime whenever a 5 is inserted anywhere in them, excluding at the end.


Here are the initial members of the sequence:

9, 21, 57, 63, 69, 77, 87, 93, 153, 231, 381, 407, 413, 417, 501, 531, 581, 651, 669, 741, 749, 783, 791, 987, 1241, 1551, 1797, 1971, 2189, 2981, 3381, 3419, 3591, 3951, 4083, 4503, 4833, 4949, 4959, 5049, 5117, 5201, 5229, 5243, 5529, 5547, 5603, 5691, 5697, 50 6957, 7329, 7389, 7557, 8451, 8711, 9561, 9617, 11337, 11631, 13511, 13533, 15153, 17991, 19539, 23553, 25869, 27053, 30093, 31551, 32249, 32951, 36441, 38159

This approach could be extended to biprimes. For example, one could ask what biprimes (or semiprimes) remain biprimes when the digit 1 is inserted anywhere in the number, including its beginning and end? Using Gemini, here are results that were generated:

Biprimes up to 40000 maintaining the property upon digit insertion (permalink):

Digit 0:

None found in this range.

Digit 1:

[34, 55, 77, 85, 87, 111, 119, 121, 141, 219, 415, 417, 514, 537, 591, 689, 713, 717, 718, 731, 781, 835, 841, 921, 1111, 1114, 1138, 1227, 1293, 1357, 1391, 1591, 1643, 1671, 1761, 1851, 1915, 2171, 2181, 2533, 2623, 2631, 3207, 3561, 3579, 3811, 4119, 4171, 4267, 4353, 5223, 5311, 5321, 5353, 6157, 6181, 6429, 6621, 6697, 7087, 7113, 7131, 7251, 7311, 7513, 7531, 7571, 7897, 8201, 8254, 8511, 8659, 9111, 9123, 9167, 9247, 9271, 9487, 9651, 10147, 10217, 10401, 10417, 10699, 10743, 10765, 11013, 11101, 11107, 11391, 11479, 11513, 11787, 11819, 11899, 12219, 12381, 12399, 12709, 12718, 12751, 12773, 14109, 14119, 14527, 14711, 14727, 15261, 15711, 16213, 16251, 16489, 16621, 16751, 16801, 16917, 17151, 17461, 17527, 17601, 17677, 18091, 18519, 18591, 19111, 19117, 19711, 19729, 19741, 19858, 19959, 20311, 21103, 21461, 21829, 22601, 23811, 24159, 24161, 25331, 26283, 26521, 26869, 27087, 27831, 28009, 29487, 30061, 30157, 30499, 31273, 31587, 32521, 32599, 33193, 33953, 34051, 34567, 34663, 35941, 36331, 36631, 37081, 37461, 37891, 38067, 38623, 39478, 39793]

Digit 2:

[6, 26, 62, 206, 302, 1202, 1226, 1262, 2966, 12242, 26762, 32282, 36422]

Digit 3:

[9, 14, 39, 55, 58, 93, 94, 133, 235, 274, 291, 305, 309, 314, 365, 403, 453, 554, 649, 713, 763, 1067, 1133, 1157, 1385, 1589, 1631, 1961, 1969, 2073, 2174, 2231, 2419, 2483, 2723, 2811, 2867, 3035, 3043, 3134, 3239, 3351, 3443, 3455, 3518, 3595, 3974, 3991, 4315, 4387, 4478, 5057, 5249, 5545, 5761, 6071, 6233, 6431, 6731, 6807, 6817, 6893, 6953, 7033, 7067, 7403, 7543, 7903, 8141, 8359, 8438, 8473, 8483, 8495, 8683, 9395, 9713, 9731, 9838, 9943, 10609, 10897, 11107, 11179, 13483, 13531, 13953, 14131, 14473, 14515, 14809, 15163, 15397, 15833, 16049, 16331, 17113, 17281, 17311, 17521, 17767, 18613, 18721, 19331, 19651, 19693, 20191, 20831, 21541, 22121, 22163, 22733, 23107, 23237, 23303, 23503, 23533, 24173, 24283, 24797, 25129, 25843, 26173, 26545, 27389, 27833, 28399, 29903, 30353, 30445, 30779, 30973, 31187, 31309, 31463, 31757, 31861, 32023, 32231, 32293, 32483, 32539, 32723, 32861, 33017, 33134, 33163, 33193, 33238, 33307, 33313, 33314, 33373, 33407, 33443, 33643, 33689, 33833, 33881, 33951, 33953, 33977, 33979, 34003, 34201, 34249, 34633, 34837, 34885, 35063, 35303, 35723, 35887, 36283, 36289, 36893, 37033, 37333, 37351, 37391, 37733, 38057, 38939, 39449, 39497, 39513, 39793]

Digit 4:

[9, 69, 93, 115, 319, 321, 381, 427, 471, 489, 511, 529, 535, 559, 1101, 1383, 1441, 1623, 1909, 2173, 2319, 2361, 2761, 2881, 3409, 3817, 4009, 4141, 4413, 4479, 4749, 5029, 5143, 5299, 5455, 5611, 6249, 6313, 6331, 6423, 6459, 6541, 7063, 7423, 8097, 8403, 8797, 9313, 11029, 11787, 11881, 12063, 13051, 13389, 13449, 13641, 14187, 14473, 14493, 15529, 18247, 21427, 23611, 24643, 25351, 26409, 26457, 26989, 27157, 28761, 30531, 31609, 31987, 34627, 35493, 35713, 36019]

Digit 5:

[15, 35, 51, 65, 155, 219, 299, 411, 515, 545, 554, 713, 755, 771, 818, 893, 905, 965, 993, 1055, 1469, 2651, 3005, 3065, 3953, 4313, 4359, 4811, 5033, 5069, 5123, 5129, 5345, 5429, 5513, 5543, 5585, 5891, 6218, 7053, 8051, 8301, 8553, 8945, 9155, 9543, 10109, 10749, 16535, 16595, 16955, 17529, 17555, 18653, 19451, 21449, 23255, 24263, 25061, 25131, 25293, 25751, 27831, 28529, 30993, 31539, 33551, 33933, 34559, 35411, 35681, 35693, 35921]

Digit 6:

[22, 62, 122, 662, 746, 2066, 17522, 38062]

Digit 7:

[377, 471, 721, 737, 778, 799, 849, 961, 1057, 1267, 1273, 1639, 1651, 1717, 2041, 2257, 2458, 2841, 3099, 3763, 3977, 3981, 4083, 4247, 4281, 4467, 4577, 4757, 5497, 6009, 6087, 6127, 6267, 6297, 6341, 6729, 6787, 7117, 7313, 7739, 7921, 7971, 8063, 8097, 8457, 8749, 8907, 9057, 9313, 9469, 9897, 9899, 10381, 10617, 11013, 11107, 11217, 11283, 12273, 13017, 13749, 14277, 14757, 15529, 16147, 16957, 17071, 17179, 17439, 17503, 17517, 17637, 17701, 17773, 17781, 17809, 18283, 19039, 19857, 21477, 21741, 23731, 24537, 27147, 27433, 27769, 28263, 28999, 29163, 29229, 30007, 30127, 30721, 31753, 31879, 32259, 32937, 33163, 33897, 34467, 35881, 37381, 37803, 37837]

Digit 8:

[15, 69, 95, 119, 213, 341, 843, 1337, 2481, 2831, 3057, 3161, 3489, 3513, 3587, 3849, 4803, 5489, 5663, 6189, 6459, 6893, 7113, 7355, 7379, 7409, 8057, 8141, 8187, 8189, 8279, 8331, 8399, 8567, 8751, 8889, 8981, 9881, 10119, 11009, 11381, 11477, 12171, 12531, 14109, 16721, 17517, 18087, 18227, 18663, 18809, 20669, 20783, 22467, 23597, 26081, 28299, 28511, 28739, 28781, 28887, 29321, 29891, 30209, 32393, 33881, 34409, 36321, 37581, 38217]

Digit 9:

[4, 21, 33, 51, 74, 93, 95, 115, 119, 183, 235, 247, 259, 481, 589, 799, 813, 914, 917, 959, 979, 989, 993, 995, 998, 1067, 1101, 1165, 1174, 1589, 1799, 1829, 1849, 2098, 2249, 2257, 2509, 2654, 2839, 2923, 2977, 3029, 3099, 3421, 3781, 3959, 4097, 4319, 4699, 4859, 4897, 5065, 5137, 5293, 5909, 5993, 6049, 6107, 6898, 7837, 7921, 8314, 8359, 8489, 8593, 8921, 9094, 9299, 9329, 9335, 9353, 9509, 9569, 9599, 9691, 9763, 9865, 9959, 9977, 10189, 10489, 10511, 10999, 12139, 12199, 13989, 14311, 14599, 14761, 15011, 15409, 15449, 15829, 16013, 16357, 16969, 17131, 17149, 17177, 17663, 18293, 18383, 18991, 19099, 19187, 19307, 19369, 19493, 19579, 19658, 19667, 19879, 19907, 19959, 20093, 20131, 20765, 21469, 22387, 22597, 22927, 22991, 23299, 24839, 24901, 25003, 25401, 25807, 25927, 26291, 26447, 27667, 27723, 27859, 27877, 28877, 28939, 28981, 28997, 29227, 29321, 29878, 30679, 30767, 30799, 30997, 31909, 32961, 34309, 35215, 35269, 35833, 35939, 36289, 36989, 37249, 38093, 38159, 38641, 39289, 39797]

Let's test for 28299 which is listed under the digit 8 where we find that:
  • \(28299 = 3 \times 9433\)
  • \(828299 = 23 \times 36013\)
  • \(288299 = 11 \times 26209\)
  • \(282899 = 79 \times 3581\)
  • \(282989 = 7 \times 40427\)
  • \(282998 = 2 \times 141499\)
Here the results for sphenic numbers (permalink):

Digit 0:

None found in this range.

Digit 1:

[1595, 3245, 5258, 5710, 7015, 7718, 8255, 8395, 9185, 9878, 9915, 11018, 11194, 16511, 17005, 18518, 18758, 18778, 19245, 27911, 30354, 31665, 33115, 33514, 37614, 38129, 39179]

Digit 2:

[222, 282, 1742, 2222, 2586, 2782, 2922, 3286, 3342, 3926, 4342, 4362, 4722, 5066, 5246, 5262, 7582, 7622, 7782, 8706, 9726, 10622, 10642, 11822, 13782, 14126, 15026, 15422, 16402, 16682, 17122, 20802, 21566, 21962, 22026, 22202, 22782, 23026, 25782, 26942, 27122, 27282, 27726, 29926, 30522, 31002, 31922, 32426, 33242, 34302, 34922, 36182, 37022, 38222, 39422, 39482]

Digit 3:

[615, 1245, 1533, 2198, 2289, 2739, 3333, 3355, 3358, 3590, 5034, 5558, 5734, 6730, 7761, 8238, 8931, 9254, 12189, 12207, 12215, 12595, 13334, 15035, 15897, 15933, 16833, 17733, 18381, 18578, 18579, 18867, 20194, 20894, 23834, 24447, 25534, 28634, 28821, 30385, 30747, 30981, 31190, 32349, 32354, 32774, 33303, 33321, 33835, 33843, 33998, 35734, 37205, 37505, 37558, 38001, 38165, 38973, 39058, 39819, 39934]

Digit 4:

[345, 665, 1547, 1955, 2895, 4585, 4695, 5595, 6645, 7545, 7885, 8729, 9465, 9485, 9515, 9685, 9911, 9915, 10885, 12265, 14465, 19245, 19495, 22555, 25991, 26381, 26745, 29087, 32035, 32145, 32155, 35405]

Digit 5:

[385, 555, 595, 705, 1085, 1455, 2085, 2355, 2555, 2685, 2865, 3355, 3558, 3565, 3585, 4345, 4355, 4565, 4605, 5258, 5405, 5495, 5555, 5835, 5898, 6135, 6785, 6955, 6978, 7554, 7955, 8355, 8533, 9678, 10585, 11473, 12174, 12395, 13115, 13574, 14795, 15535, 17515, 17895, 19598, 20855, 20881, 21765, 21954, 23165, 25085, 25334, 25543, 25858, 26114, 26115, 26555, 26765, 28145, 28754, 29235, 30594, 30635, 30965, 32415, 33155, 33485, 34655, 35315, 35655, 35893, 36515, 36555, 37465, 37565, 37655, 38185, 38558, 39589, 39785, 39885, 39895]

Digit 6:

[186, 266, 582, 806, 906, 1266, 2266, 3562, 3606, 4462, 4966, 5486, 5622, 6086, 6386, 6886, 7966, 9266, 10366, 10586, 13166, 14162, 14806, 16702, 17366, 21626, 22526, 23246, 23446, 26966, 27062, 28262, 31666, 32662, 34226, 34622, 37226, 39742]

Digit 7:

[777, 4330, 4697, 4938, 5678, 5757, 7287, 7777, 7798, 8378, 8898, 9258, 17798, 19877, 23009, 25277, 29530, 29798, 30797, 32514, 36707, 36743, 37077]

Digit 8:

[2185, 2795, 2821, 6335, 8195, 8215, 8255, 8355, 8905, 9285, 10165, 11615, 14885, 18241, 18885, 26315, 30965, 31027, 34177]

Digit 9:

[399, 915, 1515, 2595, 2877, 2937, 2955, 2985, 3201, 3399, 3598, 3945, 4767, 5019, 5133, 5709, 6141, 6693, 7257, 7918, 8697, 8798, 9291, 9398, 9545, 9717, 10090, 10923, 14755, 15171, 15794, 18699, 19495, 19833, 19839, 19869, 19970, 20694, 21754, 21957, 22258, 22989, 23691, 24477, 25203, 25809, 27219, 29289, 29578, 30018, 32165, 34869, 35457, 36879, 39158, 39185]

Let's test for 28262 which is listed under the digit 6:
  • \(28262 = 2 \times 13 \times 1087 \)
  • \(628262 = 2 \times 53 \times 5927 \)
  • \(268262 = 2 \times 113 \times 1187 \)
  • \(286262 = 2 \times 41 \times3491 \)
  • \(282662 = 2 \times 79 \times 1789 \)
  • \(282626 = 2 \times251 \times 563 \)

Wednesday, 29 July 2026

28241: Analysis of an Interesting Number

My diurnal age today, 28241, has a number of interesting properties and a couple of them I've not met before. Let's examine them one by one.

FIRST INTERESTING PROPERTY

28241 can be formed by a concatenation of powers of 2 since all its digits are powers of 2 but the digits of its prime factors are all powers of 3:$$ \begin{align} 28241 & \equiv 2^1 \, || \, 2^3 \, || \, 2^1 \, || \, 2^2 \, || \, 2^0 \\ 28241 &= 31 \times 911 \\ &\equiv 3^1 \, || \, 3^0 \times 3^2 \, || \, 3^0 \, || \, 3^0 \end{align}$$In the range up to 40000, this doesn't happen often (ignoring 1 and 121 whose factors contain only the digits 1):$$ \begin{align} 81 &= 3^4  \\ 1441 &= 11 \times 131 \\1881 &= 3^2 \times 11 \times 19 \\ 21241 &= 11 \times 1931 \\ 28241 &= 31 \times 911 \end{align}$$SECOND INTERESTING PROPERTY

28241 is a member of OEIS A227942:


A227942: semiprimes formed by inserting a semiprime between the semiprime's ordered factors.

In the range up to 40000, only the following numbers qualify:

393, 2105, 2147, 3155, 5255, 5357, 25829, 26231, 28241, 29447, 33913, 35719, 39331$$ \begin{align} 3 \textbf{9} 3 &= 3 \times 131 \\ 2 \textbf{10} 5 &= 5 \times 421 \\ 2 \textbf{14} 7 &= 19 \times 113 \\ 3 \textbf{15} 5 &= 5 \times 631 \\ 5 \textbf{25} 5 &= 5 \times 1051 \\ 5 \textbf{35} 7 &= 11 \times 487 \\ 2 \textbf{58} 29 &= 23 \times 1123 \\ 2 \textbf{62} 31 &= 17 \times 1543 \\ 2 \textbf{82} 41 &= 31 \times 911 \\ 2 \textbf{94} 47 &= 11 \times 2677 \\ 3 \textbf{39} 13 &= 11 \times 3083 \\ 3 \textbf{57} 19 &= 23 \times 1553 \\ 3 \textbf{93} 31 &= 37 \times 1063 \end{align}$$THIRD INTERESTING PROPERTY

28241 is a member of OEIS A367337:


A367337: member of the commas sequence  starting with 5.


I'm familiar with the commas sequences and have written about them in a post titled The Commas Sequence in December of 2023. I won't show the full sequence but this snippet gives an idea of what's going on:$$ \dots, 28077, 28149, 28241, 28253, 28285, \dots $$Up to 40000, the remaining members of the sequence are:

28253, 28285, 28337, 28409, 28501, 28513, 28545, 28597, 28669, 28761, 28773, 28805, 28857, 28929, 29021, 29033, 29065, 29117, 29189, 29281, 29293, 29325, 29377, 29449, 29541, 29553, 29585, 29637, 29709, 29801, 29813, 29845, 29897, 29969, 30062, 30085, 30138, 30221, 30234, 30277, 30350, 30353, 30386, 30449, 30542, 30565, 30618, 30701, 30714, 30757, 30830, 30833, 30866, 30929, 31022, 31045, 31098, 31181, 31194, 31237, 31310, 31313, 31346, 31409, 31502, 31525, 31578, 31661, 31674, 31717, 31790, 31793, 31826, 31889, 31982, 32005, 32058, 32141, 32154, 32197, 32270, 32273, 32306, 32369, 32462, 32485, 32538, 32621, 32634, 32677, 32750, 32753, 32786, 32849, 32942, 32965, 33018, 33101, 33114, 33157, 33230, 33233, 33266, 33329, 33422, 33445, 33498, 33581, 33594, 33637, 33710, 33713, 33746, 33809, 33902, 33925, 33978, 34061, 34074, 34117, 34190, 34193, 34226, 34289, 34382, 34405, 34458, 34541, 34554, 34597, 34670, 34673, 34706, 34769, 34862, 34885, 34938, 35021, 35034, 35077, 35150, 35153, 35186, 35249, 35342, 35365, 35418, 35501, 35514, 35557, 35630, 35633, 35666, 35729, 35822, 35845, 35898, 35981, 35994, 36037, 36110, 36113, 36146, 36209, 36302, 36325, 36378, 36461, 36474, 36517, 36590, 36593, 36626, 36689, 36782, 36805, 36858, 36941, 36954, 36997, 37070, 37073, 37106, 37169, 37262, 37285, 37338, 37421, 37434, 37477, 37550, 37553, 37586, 37649, 37742, 37765, 37818, 37901, 37914, 37957, 38030, 38033, 38066, 38129, 38222, 38245, 38298, 38381, 38394, 38437, 38510, 38513, 38546, 38609, 38702, 38725, 38778, 38861, 38874, 38917, 38990, 38993, 39026, 39089, 39182, 39205, 39258, 39341, 39354, 39397

FOURTH INTERESTING PROPERTY

28241 has the property that:

  • sum of digits ( \(  \, \text{SOD}  \, \)  ) is prime: \(2 + 8 + 2 + 4 + 1 =17 \)

  • sum of digits squared (  \( \, \text{SOD}^2 \, \) ) is prime: \(2^2 + 8^2 + 2^2 + 4^2 + 1^2 =89 \)

  • sum of digits cubed ( \( \, \text{SOD}^3 \, \) ) is prime:  \(2^3 + 8^3 + 2^3 + 4^3 + 1^3 = 593 \)

This property is relatively common but nonetheless interesting.