Showing posts with label non-primes. Show all posts
Showing posts with label non-primes. Show all posts

Wednesday, 20 May 2026

Dual Attractors

I've written about attractors, vortices, vorticals and captives in many earlier posts. In my nomenclature attractors can be prime/non-prime or odd/even:

  • a prime/non-prime attractor has sums of prime digits and non-prime digits that are equal
  • an odd/even attractor has sums of odd and even digits that are equal
An example of a prime/non-prime attractor would be 28330 where 2 + 3 + 3 = 8 + 0. Other numbers do not have this balance and under the recursion:

number --> number + sum of prime digits - sum of non-prime digits

some will be "attracted" to 28330, meaning that repeated application of the recursion will lead to the attractor. In the case of 28330, there are 19 such numbers (termed captives):
28327, 28331, 28332, 28333, 28334, 28335, 28336, 28337, 28338, 28339, 28340, 28341, 28342, 28343, 28344, 28345, 28346, 28348, 28349
An example of an odd/even attractor would be 29612 where 9 + 1 = 2 + 6 + 2. Other numbers again do not have this balance and under the recursion:

number --> number + sum of odd digits - sum of even digits

some will be "attracted" to 29612, meaning that repeated applications of the recursion will lead to the attractor. In the case of 29612, there are 20 such numbers (termed captives):
29517, 29537, 29559, 29571, 29583, 29585, 29587, 29590, 29591, 29592, 29594, 29596, 29598, 29605, 29610, 29611, 29613, 29614, 29616, 29618

Some attractors can be both prime/non-prime and odd/even and in the range up to 40000 there are 223 of them (permalink):

0, 112, 121, 211, 336, 358, 363, 385, 538, 583, 633, 835, 853, 1012, 1021, 1102, 1120, 1201, 1210, 2011, 2101, 2110, 3036, 3058, 3063, 3085, 3306, 3360, 3445, 3454, 3467, 3476, 3508, 3544, 3580, 3603, 3630, 3647, 3674, 3746, 3764, 3805, 3850, 4345, 4354, 4367, 4376, 4435, 4453, 4534, 4543, 4556, 4565, 4578, 4587, 4637, 4655, 4673, 4736, 4758, 4763, 4785, 4857, 4875, 5038, 5083, 5308, 5344, 5380, 5434, 5443, 5456, 5465, 5478, 5487, 5546, 5564, 5645, 5654, 5667, 5676, 5748, 5766, 5784, 5803, 5830, 5847, 5874, 6033, 6303, 6330, 6347, 6374, 6437, 6455, 6473, 6545, 6554, 6567, 6576, 6657, 6675, 6734, 6743, 6756, 6765, 6778, 6787, 6877, 7346, 7364, 7436, 7458, 7463, 7485, 7548, 7566, 7584, 7634, 7643, 7656, 7665, 7678, 7687, 7768, 7786, 7845, 7854, 7867, 7876, 8035, 8053, 8305, 8350, 8457, 8475, 8503, 8530, 8547, 8574, 8677, 8745, 8754, 8767, 8776, 10012, 10021, 10102, 10120, 10201, 10210, 11002, 11020, 11200, 12001, 12010, 12100, 20011, 20101, 20110, 21001, 21010, 21100, 30036, 30058, 30063, 30085, 30306, 30360, 30445, 30454, 30467, 30476, 30508, 30544, 30580, 30603, 30630, 30647, 30674, 30746, 30764, 30805, 30850, 33006, 33060, 33600, 34045, 34054, 34067, 34076, 34405, 34450, 34504, 34540, 34607, 34670, 34706, 34760, 35008, 35044, 35080, 35404, 35440, 35800, 36003, 36030, 36047, 36074, 36300, 36407, 36470, 36704, 36740, 37046, 37064, 37406, 37460, 37604, 37640, 38005, 38050, 38500

Let's take 37640 as an example:

  • it is a prime attractor since prime digits 3 + 7 = 6 + 4 + 0 (non-prime digits)

    It has 14 captives: 37612, 37615, 37617, 37623, 37627, 37632, 37633, 37641, 37642, 37643, 37644, 37646, 37648, 37649

  • it is an odd/even attractor since odd digits 3 + 7 = 6 + 4 + 0 (even digits)

    It has 11 captives: 37611, 37617, 37619, 37629, 37633, 37641, 37642, 37643, 37644, 37646, 37648

Of course the order of digits makes no difference and so many of these 223 numbers are just permutations of another's digits and 0's can be added anywhere because they do not affect the sum. Take 358 as an example. Permutations of its digits with or without 0 added include 385, 538, 583, 835, 853, 3058, 3085, 3508, 3580, 3805, 3850 etc.

In fact if we strip out the zeroes and put the digits in ascending order then the above list of 223 reduces to merely 112, 336, 358, 3445, 3467, 4556, 4578, 5667, 6778.

Tuesday, 13 May 2025

An Interesting Sequence of Primes

Consider the sequence of primes and the products of their digits (POD). As the primes increase, these products will reach record values as certain primes are encountered. Table 1 shows these primes above 20000 together with their record products (permalink):


Table 1

Here are the primes without their products (listed in OEIS A230041):

2, 3, 5, 7, 19, 29, 37, 47, 59, 79, 89, 199, 269, 359, 379, 389, 479, 499, 599, 797, 887, 997, 1889, 1999, 2689, 2699, 2789, 2999, 3889, 3989, 4789, 4799, 4889, 4999, 6899, 8999, 25999, 27799, 28789, 28979, 29989, 37799, 37889, 39799, 39989

\( \textbf{27799} \) is the number associated with my diurnal age today which is why I was alerted to this sequence. If we consider both prime and non-prime numbers then the results are shown in Table 2 for numbers greater than 20000.


Table 2

Here is a list of the numbers with record breaking products up to 40000 (see OEIS A095706):

2, 3, 4, 5, 6, 7, 8, 9, 25, 26, 27, 28, 29, 37, 38, 39, 47, 48, 49, 58, 59, 68, 69, 78, 79, 88, 89, 99, 259, 268, 269, 278, 279, 288, 289, 299, 378, 379, 388, 389, 399, 479, 488, 489, 499, 589, 599, 689, 699, 789, 799, 889, 899, 999, 2599, 2689, 2699, 2789, 2799, 2889, 2899, 2999, 3789, 3799, 3889, 3899, 3999, 4799, 4889, 4899, 4999, 5899, 5999, 6899, 6999, 7899, 7999, 8899, 8999, 9999, 25999, 26899, 26999, 27899, 27999, 28899, 28999, 29999, 37899, 37999, 38899, 38999, 39999

Wednesday, 27 November 2024

Prime and Non-Prime Digit Sequence

I've posted extensively about the trajectories formed by repeatedly adding the sum of the odd digits of a number to the number itself while subtracting the sum of the even digits, or vice versa. My most recent post was on this topic was titled Revisiting Odds And Evens. Instead of dealing with odd and even digits, trajectories involving prime and non-prime digit sums can be considered. The prime digits are 2, 3, 5 and 7 while the non-prime digits are 0, 1, 4, 6, 7 and 9.

For example, the number associated with my diurnal age today is 27632 and it has the following trajectory of 3 steps under the prime and non-prime algorithm (permalink):

27632 --> 27640 --> 27639 --> 27636 --> 27636

The trajectory terminates when the number has a sum of primes and sum of non-primes that are equal, here 2 + 7 + 3 = 6 + 6. Numbers such as these are NOT listed in the OEIS but there is a listing for prime numbers with this property. There are 137 such primes in the range up to 40,000.


A371352
: prime numbers such that the sum of their prime digits is equal to the sum of their nonprime digits.

The sequence begins (permalink):

167, 211, 541, 617, 761, 853, 1021, 1201, 1423, 1559, 1607, 1973, 2011, 2143, 2341, 2383, 2833, 3467, 3719, 3823, 3917, 4051, 4231, 4637, 4673, 5261, 5443, 5519, 5591, 6473, 6521, 6701, 7193, 7643, 7687, 7867, 8053, 8233, 8677, 9137, 9173, 9371, 9551, 10067, 10243, 10559, 10607, 10739, 10937, 10973, 11471, 11783, 12043, 12263, 12539, 12953, 13187, 13259, 13709, 13781, 13907, 14779, 14797, 15329, 15361, 15581, 15923, 16007, 16223, 17093, 17183, 17497, 17749, 17903, 18371, 18713, 18731, 19037, 19073, 19477, 20011, 20101, 20143, 20341, 20431, 21001, 22613, 23041, 23159, 24103, 25391, 25463, 25601, 25643, 25867, 25913, 25931, 26321, 26501, 28657, 29153, 29531, 30197, 30241, 30467, 30971, 31079, 31259, 31817, 31907, 32083, 32159, 32261, 32401, 32443, 32621, 32803, 33479, 33749, 34607, 34739, 35129, 35291, 36151, 37019, 37181, 37493, 37811, 37879, 37897, 37987, 38711, 38977, 39107, 39251, 39521, 39877

Many number trajectories will end in what I call an "attractor", using my Odds and Evens terminology. This is a number whose sums of prime and non-prime digits are equal. For completeness, here is a list of all the 446 NUMBERS (prime or composite) greater than 27630 and less than 40000 with the property that the sum of their prime digits equals the sum of their non-prime digits (permalink):

27636, 27658, 27663, 27685, 27788, 27801, 27810, 27834, 27843, 27856, 27865, 27878, 27887, 27900, 28017, 28033, 28071, 28107, 28125, 28152, 28170, 28215, 28222, 28251, 28303, 28330, 28347, 28374, 28437, 28455, 28473, 28512, 28521, 28545, 28554, 28567, 28576, 28657, 28675, 28701, 28710, 28734, 28743, 28756, 28765, 28778, 28787, 28877, 29007, 29025, 29052, 29070, 29135, 29153, 29205, 29223, 29232, 29250, 29315, 29322, 29351, 29502, 29513, 29520, 29531, 29700, 30036, 30058, 30063, 30085, 30111, 30124, 30142, 30179, 30197, 30214, 30238, 30241, 30283, 30306, 30328, 30339, 30360, 30382, 30393, 30412, 30421, 30445, 30454, 30467, 30476, 30508, 30544, 30580, 30603, 30630, 30647, 30674, 30719, 30746, 30764, 30791, 30805, 30823, 30832, 30850, 30917, 30933, 30971, 31011, 31024, 31042, 31079, 31097, 31101, 31110, 31134, 31143, 31156, 31165, 31178, 31187, 31204, 31226, 31240, 31259, 31262, 31295, 31314, 31338, 31341, 31383, 31402, 31413, 31420, 31431, 31516, 31529, 31561, 31592, 31615, 31622, 31651, 31709, 31718, 31781, 31790, 31817, 31833, 31871, 31907, 31925, 31952, 31970, 32014, 32038, 32041, 32083, 32104, 32126, 32140, 32159, 32162, 32195, 32216, 32229, 32261, 32292, 32308, 32344, 32380, 32401, 32410, 32434, 32443, 32456, 32465, 32478, 32487, 32519, 32546, 32564, 32591, 32612, 32621, 32645, 32654, 32667, 32676, 32748, 32766, 32784, 32803, 32830, 32847, 32874, 32915, 32922, 32951, 33006, 33028, 33039, 33060, 33082, 33093, 33114, 33138, 33141, 33183, 33208, 33244, 33280, 33309, 33318, 33381, 33390, 33411, 33424, 33442, 33479, 33497, 33600, 33749, 33794, 33802, 33813, 33820, 33831, 33903, 33930, 33947, 33974, 34012, 34021, 34045, 34054, 34067, 34076, 34102, 34113, 34120, 34131, 34201, 34210, 34234, 34243, 34256, 34265, 34278, 34287, 34311, 34324, 34342, 34379, 34397, 34405, 34423, 34432, 34450, 34504, 34526, 34540, 34559, 34562, 34595, 34607, 34625, 34652, 34670, 34706, 34728, 34739, 34760, 34782, 34793, 34827, 34872, 34937, 34955, 34973, 35008, 35044, 35080, 35116, 35129, 35161, 35192, 35219, 35246, 35264, 35291, 35404, 35426, 35440, 35459, 35462, 35495, 35549, 35594, 35611, 35624, 35642, 35679, 35697, 35769, 35796, 35800, 35912, 35921, 35945, 35954, 35967, 35976, 36003, 36030, 36047, 36074, 36115, 36122, 36151, 36212, 36221, 36245, 36254, 36267, 36276, 36300, 36407, 36425, 36452, 36470, 36511, 36524, 36542, 36579, 36597, 36627, 36672, 36704, 36726, 36740, 36759, 36762, 36795, 36957, 36975, 37019, 37046, 37064, 37091, 37109, 37118, 37181, 37190, 37248, 37266, 37284, 37349, 37394, 37406, 37428, 37439, 37460, 37482, 37493, 37569, 37596, 37604, 37626, 37640, 37659, 37662, 37695, 37789, 37798, 37811, 37824, 37842, 37879, 37897, 37901, 37910, 37934, 37943, 37956, 37965, 37978, 37987, 38005, 38023, 38032, 38050, 38117, 38133, 38171, 38203, 38230, 38247, 38274, 38302, 38313, 38320, 38331, 38427, 38472, 38500, 38711, 38724, 38742, 38779, 38797, 38977, 39017, 39033, 39071, 39107, 39125, 39152, 39170, 39215, 39222, 39251, 39303, 39330, 39347, 39374, 39437, 39455, 39473, 39512, 39521, 39545, 39554, 39567, 39576, 39657, 39675, 39701, 39710, 39734, 39743, 39756, 39765, 39778, 39787, 39877

Also for completeness, here is a list of all the numbers greater than 27630 and less than 40000 with the property they map back to themselves after two or more repetitions of the prime / non-prime algorithm. In other words, they are "vorticals" each belonging to a "vortex" to use my Odds and Evens nomenclature.

27675, 27684, 27690, 27823, 27829, 27837, 27848, 27855, 27866, 27873, 27884, 27922, 27926, 27933, 27939, 27954, 27955, 27964, 27965, 27972, 27981, 28027, 28030, 28272, 28273, 28277, 28279, 28282, 28287, 28352, 28355, 28356, 28362, 28532, 28536, 28553, 28560, 28723, 28729, 28737, 28748, 28755, 28766, 28773, 28784, 29272, 29276, 29372, 29373, 29377, 29379, 29382, 29387, 29507, 29511, 29512, 29552, 29553, 29557, 29559, 29566, 29567, 29570, 29575, 29580, 29585, 29722, 29726, 29733, 29739, 29754, 29755, 29764, 29765, 29772, 29781, 30003, 30009, 30012, 30016, 30075, 30084, 30090, 30102, 30106, 30135, 30138, 30145, 30148, 30259, 30260, 30277, 30286, 30296, 30342, 30346, 30378, 30383, 30384, 30387, 30391, 30392, 30432, 30436, 30453, 30460, 30562, 30566, 30652, 30655, 30656, 30662, 30782, 30786, 30795, 30801, 30872, 30876, 30927, 30930, 31002, 31006, 31035, 31038, 31045, 31048, 31123, 31129, 31137, 31148, 31155, 31166, 31173, 31184, 31213, 31219, 31276, 31281, 31359, 31360, 31377, 31386, 31396, 31407, 31411, 31412, 31452, 31453, 31457, 31459, 31466, 31467, 31470, 31475, 31480, 31485, 31543, 31549, 31579, 31584, 31672, 31673, 31677, 31679, 31682, 31687, 31763, 31769, 31827, 31830, 32059, 32060, 32077, 32086, 32096, 32113, 32119, 32176, 32181, 32243, 32249, 32279, 32284, 32362, 32366, 32423, 32429, 32437, 32448, 32455, 32466, 32473, 32484, 32582, 32586, 32632, 32636, 32653, 32660, 32793, 32797, 32799, 32806, 32807, 32811, 32852, 32855, 32856, 32862, 32972, 32973, 32977, 32979, 32982, 32987, 33042, 33046, 33078, 33083, 33084, 33087, 33091, 33092, 33159, 33160, 33177, 33186, 33196, 33262, 33266, 33363, 33369, 33402, 33406, 33435, 33438, 33445, 33448, 33583, 33589, 33592, 33596, 33622, 33626, 33633, 33639, 33654, 33655, 33664, 33665, 33672, 33681, 33807, 33811, 33812, 33852, 33853, 33857, 33859, 33866, 33867, 33870, 33875, 33880, 33885, 33952, 33955, 33956, 33962, 34032, 34036, 34053, 34060, 34107, 34111, 34112, 34152, 34153, 34157, 34159, 34166, 34167, 34170, 34175, 34180, 34185, 34223, 34229, 34237, 34248, 34255, 34266, 34273, 34284, 34302, 34306, 34335, 34338, 34345, 34348, 34472, 34476, 34513, 34519, 34576, 34581, 34742, 34746, 34778, 34783, 34784, 34787, 34791, 34792, 35062, 35066, 35143, 35149, 35179, 35184, 35282, 35286, 35383, 35389, 35392, 35396, 35413, 35419, 35476, 35481, 35602, 35606, 35635, 35638, 35645, 35648, 35822, 35826, 35833, 35839, 35854, 35855, 35864, 35865, 35872, 35881, 35932, 35936, 35953, 35960, 36052, 36055, 36056, 36062, 36172, 36173, 36177, 36179, 36182, 36187, 36232, 36236, 36253, 36260, 36322, 36326, 36333, 36339, 36354, 36355, 36364, 36365, 36372, 36381, 36502, 36506, 36535, 36538, 36545, 36548, 36713, 36719, 36776, 36781, 37082, 37086, 37163, 37169, 37293, 37299, 37442, 37446, 37478, 37483, 37484, 37487, 37491, 37492, 37613, 37619, 37676, 37681, 37802, 37806, 37835, 37838, 37845, 37848, 37923, 37929, 37937, 37948, 37955, 37966, 37973, 37984, 38072, 38076, 38127, 38130, 38252, 38255, 38256, 38262, 38307, 38311, 38312, 38352, 38353, 38357, 38359, 38366, 38367, 38370, 38375, 38380, 38385, 38522, 38526, 38533, 38539, 38554, 38555, 38564, 38565, 38572, 38581, 38702, 38706, 38735, 38738, 38745, 38748, 39027, 39030, 39272, 39273, 39277, 39279, 39282, 39287, 39352, 39355, 39356, 39362, 39532, 39536, 39553, 39560, 39723, 39729, 39737, 39748, 39755, 39766, 39773, 39784

Take for example, the first member of the above series of numbers:

27675 --> 27690 --> 27684 --> 27675

Here (27675, 27690, 27684) forms a vortex while the individual members (27675, 27690 and 27684) are vorticals. If a number is not an attractor or a vortical then it will captured either by an attractor or a vortex. For example, 27676 is captured by the vortex just mentioned:

27676 --> 27680 --> 27675 --> 27690 --> 27684 --> 27675

On the other hand, 27659 is captured by the attractor 27658:

27659 --> 27658 --> 27658

I've now included in my multipurpose algorithm the trajectory of a number under the prime and non-prime algorithm.