Showing posts with label even. Show all posts
Showing posts with label even. Show all posts

Tuesday, 18 August 2026

ODD - and EVEN + Improved Format

Some time ago I got Gemini to create a 197 page document that identifies attractors and vortices arising from the recursive ODD - and EVEN + algorithm. It also lists their number of captives. Today I got Gemini to summarise and reformat this information so that it is more readable using the exact same template it created for my August 15th post titled ODD + and EVEN - Improved Format. That 142 page document can be located here. Here are some excerpts:


Figure 1


Figure 2


Table 1


Table 2


Table 3

Table 4

Notice that while 8987 has the record number of captives under the ODD - and EVEN + recursive algorithm (in the range up to 40000), it has ZERO captives under the ODD + and EVEN - recursive algorithm. Conversely, while 38013 is a vortical in the mighty vortex {38013, 38012, 38006, 37995, 38028} with 564 captives under the ODD + and EVEN - recursive algorithm, it is a mere captive of the attractor 38050 under the ODD - and EVEN + recursive algorithm.

Saturday, 15 August 2026

ODD + and EVEN - Improved Format

Some time ago I got Gemini to carry out an analysis for me of attractors and vortices in the range up to 40000 under the ODD + and EVEN - algorithm. I copied the output into a Google document that listed: 

  • each attractor and how many captives it had
  • each vortex (along with the vorticals that comprised it)
  • the number of captives the vortex had
Here is the information the 193 page document displays for the attractor 39642:
  • Attractor: 39642
  • Captive Count: 395
  • Captives: [38997, 39017, 39035, 39037, 39039, 39053, 39055, 39059, 39063, 39065, 39070, 39071, 39072, 39073, 39074, 39075, 39076, 39077, 39078, 39083] ... (and 375 more)
Here is the information the documents displays for the vortex [38013, 38012, 38006, 37995, 38028]:
  • Vortex (Vorticals): [38013, 38012, 38006, 37995, 38028]
  • Captive Count: 564
  • Captives: [37055, 37075, 37097, 37099, 37107, 37123, 37125, 37127, 37133, 37135, 37137, 37139, 37141, 37143, 37145, 37149, 37150, 37151, 37152, 37153] ... (and 544 more)
The attractors and vortices are arranged in descending order by number of captives. The information is readily accessible but I thought I'd use Gemini again to improve the formatting of the document to make it more readable. Figure 1 shows the opening page of the 137 page document and Figure 2 shows the second page.


Figure 1


Figure 2

The document lists the attractors in ascending order and also in descending order by number of captives (see Tables 1 and 2 for the start of each table).


Table 1


Table 2

The document goes on to list vortices in ascending order and also in descending order by number of captives (see Tables 3 and 4):


Table 3


Table 4

Overall the document provides an excellent organisation of the data and I'll roll this out this the results for the ODD - and EVEN + algorithm and the PRIME + NON-PRIME - algorithm in the near future.

Friday, 14 August 2026

ODD + and EVEN - Trajectory Lengths

Let's revisit the ODD + and EVEN - algorithm that I first discussed in a post titled Odds and Evens from June of 2021. In that post, I looked at the trajectory lengths of numbers up to 100,000 and Figure 1 shows a graph summarising what I found.


Figure 1: permalink

I also found that in the range up to 100,000 there were 3725 numbers that are attractors, in other words the sums of their odd and even digits are equal. Of these, 301 are prime. These number belong to OEIS 
A036301:


 A036301

Numbers whose sum of even digits and sum of odd digits are equal.    

I then extended the range to 200,000 and found a number (158893) that required 91 steps before it entered a loop or, to put it another way, it was captured by a vortex. In this case, the vortex consisted of the vorticals 160028, 160013, 160012, 160006, 159995, 160033, 160034. Figure 2 shows a graph of the trajectories:


Figure 2: permalink

I noted that the
 average trajectory length has increased from 8.58 to 10.6. Back in 2021 I don't think I was using a Jupyter notebook and couldn't investigate further beyond 200,000 without SageMathCell timing out. With the Jupyter notebook, I was able to extend the search to one million and Figure 3 shows a graph of the trajectories:


Figure 3: permalink 
(will need a Jupyter notebook)

Over this range, the average trajectory length has increased to 14 and the record step length has increases to 287 compared to 91 in the range up to 200,000 and 81 in the range up to 100,000.

In that original blog post, I also looked at the proportion of numbers that were attractors compared to those numbers that were captives of attractors or that entered loops (this included vorticals and captives of vortices). I considered a range up to 100,000. These were the results (permalink)
  • total of numbers that are captives of attractors 58977 up to 100000 or 59.0 percent
  • total of numbers that end in a loop is 37298 up to 100000 or 37.3 percent
  • total number of attractors up to 100000 is 3725 or 3.73 percent
Using my Jupyter notebook to extend the range to one million, the results were:

  • total of numbers that are captives of attractors is 511859 up to 1000000 or 51.2 percent

  • total of numbers that end in a loop is 463061 up to 1000000 or 46.3 percent
  • total number of attractors up to 1000000 is 25080 or 2.51 percent

Sunday, 31 May 2026

Palindromic Day 28182

Palindromic properties of 28182 (showing only sequence members up to 40000):


A098834: palindromic Smith numbers.

4, 22, 121, 202, 454, 535, 636, 666, 1111, 1881, 3663, 7227, 7447, 9229, 10201, 17271, 22522, 24142, 28182, 33633, 38283

A Smith number is a composite number where the sum of its digits equals the sum of the digits of its prime factors. For 28182:$$ \begin{align} 28182 &\rightarrow 2+8+1+8+2 = 21 \\ 28182 &= 2 \times 3 \times 7 \times 11 \times 61\\ &\rightarrow 2 + 3 + 7 + 1+1+6 +1 =21 \end{align}$$


A046395: palindromes that are the product of 5 distinct primes.

6006, 8778, 20202, 28182

Here \(28182 = 2 \times 3 \times 7 \times 11 \times 61 \)


A099052: all palindromes of length > 1 in the decimal expansion of \(e\).

\(e\) = 2.71828182845904523536028747135266 ...


A045571: numbers that are palindromic, divisible by 11 and have an odd number of digits.

121, 242, 363, 484, 616, 737, 858, 979, 10901, 11011, 12221, 13431, 14641, 15851, 17171, 18381, 19591, 20702, 21912, 22022, 23232, 24442, 25652, 26862, 28182, 29392, 30503, 31713, 32923, 33033, 34243, 35453, 36663, 37873, 39193

All the palindromic numbers with an even number of digits are divisible by 11. The number of palindromic numbers with \(2k+1\) digits that are divisible by 11 is \((10^{k+1} + (-1)^k)/11\), and their asymptotic relative density within the set of all palindromic numbers with an odd number of digits is 1/11 (from OEIS comments).


A113838
: palindromes sandwiched between twin primes.

4, 6, 282, 828, 858, 2112, 21012, 21612, 23832, 26262, 26862, 28182

Here of course the twin primes are 28181 and 28183.


A032751
: palindromic Super-3 Numbers.

4554, 6776, 17471, 22322, 22722, 28182

Super-3 numbers \(n\) are of the form \(3 \times n^3 \) and contain three consecutive 3's.

Here \(3 \times 28182^3 = 67148557\textbf{333}704\)

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.

Monday, 18 May 2026

Base 10 Primes in Higher Number Bases

The thought struck me as to what primes in base 10 remain prime when the digits stay the same but the number base increases to 11, 12, 13 etc. I got Gemini to investigate and it came up with useful summary and an impressive interactive tool for investigation:

To analyze this integer sequence mathematically, we can define the transformation as evaluating a polynomial.

Let a base-10 prime \( p \) have the decimal representation \( d_k d_{k-1} \dots d_1 d_0 \). The value of \( p \) is given by:

\[ p = \sum_{i=0}^{k} d_i 10^i \]

When we take these same digits and interpret them in a higher base \( b \) (where \( 11 \le b \le 36 \)), we are evaluating the new integer \( P_b \):

\[ P_b = \sum_{i=0}^{k} d_i b^i \]

The task is to find all instances where both \( p \) and \( P_b \) are prime. When we run this analysis across different bases, distinct number-theoretic patterns emerge, particularly regarding parity and divisibility.

The Parity Sieve for Odd Bases

The parity of the new number \( P_b \) depends entirely on whether the target base \( b \) is odd or even.

If the target base \( b \) is odd (e.g., base 11, 13, 15), then \( b \equiv 1 \pmod 2 \). Consequently, the modulo-2 value of the new number collapses to the sum of its digits:

\[ P_b \equiv \sum_{i=0}^{k} d_i \pmod 2 \]

This creates a massive sieve: if the sum of the digits of the original prime \( p \) is even, \( P_b \) will inevitably be even. Since \( P_b > 2 \) for all target primes in these higher bases, an even \( P_b \) is strictly composite. Therefore, odd bases yield a significantly sparser sequence of primes.

The Density in Even Bases

If the target base \( b \) is even (like the default \( b=16 \)), then \( b \equiv 0 \pmod 2 \). In this scenario, all terms multiplied by \( b \) are even, meaning the parity of \( P_b \) relies solely on the final digit \( d_0 \):

\[ P_b \equiv d_0 \pmod 2 \]

Because \( p \) is prime in base-10, its final digit \( d_0 \) must be odd (1, 3, 7, or 9) with the sole exception of \( p=2 \). Therefore, \( P_b \) will always be odd in an even base. Because they bypass the digit-sum parity trap, even bases like 16 retain a much higher density of prime numbers.

Small Examples in Base 16

For \( b=16 \), examining the first few base-10 primes reveals the retention rate:

  • 11: \( 1(16) + 1 = 17 \) (Prime)
  • 13: \( 1(16) + 3 = 19 \) (Prime)
  • 17: \( 1(16) + 7 = 23 \) (Prime)
  • 19: \( 1(16) + 9 = 25 \) (Composite, \( 5 \times 5 \))
  • 23: \( 2(16) + 3 = 35 \) (Composite, \( 5 \times 7 \))
  • 29: \( 2(16) + 9 = 41 \) (Prime)

To thoroughly investigate the sequence up to 40,000 across any base from 11 to 36 without relying on a static, truncated list, the interactive tool below is designed to compute the results dynamically. It handles the base conversions and primality testing locally within your browser.

Total Primes Found: 0
Index Base 10 Prime Value in Target Base

Friday, 3 April 2026

77th Birthday

Today I turned 77 years of age and my equivalent diurnal age is 28124 which has the following factorisation:$$28124=2 \times 2 \times 79 \times 89$$Though this number is composite, it has numerous prime number associations. Let's examine some of them beginning with its sum of digits, sum of digits squares and sum of digits cubed:$$ \begin{align} 2 + 8 + 1 + 2 + 4 &=17 \text{ (prime)} \\2^2+8^2+1^2+2^2+8^4 &= 89 \text{ (prime)} \\2^3+8^3+1^3+2^3+8^3 &= 593 \text{ (prime)} \end{align}$$The number is only one step removed from its home prime because:$$28124=2 \times 2 \times 79 \times 89 \rightarrow 227989 \text{ (prime)}$$The number is also a member of OEIS A048381: numbers such that replacing each nonzero digit with the n-th prime (replacing each 0 digit with a 1) yields a prime. Thus:$$28124 \rightarrow 319237 \text{ (prime)}$$The number has a binary complement that is prime. The binary complement of a number is determined by changing the number to binary and swapping any 0's for 1's and vice versa. Thus:$$ \begin{align} 28124_{10} &= 110110111011100_2 \\ &\rightarrow 001001000100011_2 \\ &=4643_{10} \text{ (prime)} \end{align}$$The number is quickly captured by the prime 28109 under the ODD(+) and EVEN(-) algorithm where the sum of the odd digits is added to the number and the sum of the even digits is subtracted recursively until a fixed point is reached or a loop is entered. Here is the trajectory is simply:$$ \begin{align} 28124 &\rightarrow 28124 + 1 -(2 + 8 + 2 + 4) \\ &=28124 + 1 - 16 \\ &=28109 \text{ (prime)} \end{align}$$The number can be considered as a concatenation of powers of the prime 2 because:$$ 28124 = 2^1\, | \,2^3 \,| \,2^0 \,| \,2^1 \,| \, 2^2 $$where | represents concatenation. The number can be generated by adding the prime sum (13) of the digits of the prime 28111 to itself. Thus:$$28111+13=28124$$The digits of the number can be rearranged to form the following primes:$$22481, 24281, 24821, 42281, 42821, 48221, 82241, 82421, 84221$$The position 28124 in the Recaman Sequence is reached after a prime number of iterations:$$0 \rightarrow 28124 \text{ requires } 34183 \text{ (prime) iterations}$$

Saturday, 31 January 2026

Abundant But Not Zumkeller

A property of the number \( \textbf{28062}\) associated with my diurnal age today prompted me to look more closely at abundant numbers that are not Zumkeller. 28062 has the following properties:$$ \begin{align} 28062 &=2 \times 3^2 \times 1559\\ \text{ divisors }  &\rightarrow 1, 2, 3, 6, 9, 18, 1559, 3118, 4677, 9354, 14031, 28062 \end{align}$$Normally, for abundant numbers, the set of divisors can be divided into two mutually exclusive sets whose elements sum to the same number. However, this simply can't be done with 28062.

Now up to 40000, there are 718 abundant numbers that are abundant but not Zumkeller. 146 of these have an odd sum of divisors and an even split is not possible. The other 572 have an even sum of divisors and thus have the potential for an even split but it proves impossible to find one. Here are the details:

There are 572 abundant numbers with an \( \textbf{even}\) sum of divisors. They are (up to 40000):

[738, 748, 774, 846, 954, 1062, 1098, 1206, 1278, 1314, 1422, 1494, 1602, 1746, 1818, 1854, 1926, 1962, 2034, 2286, 2358, 2466, 2502, 2682, 2718, 2826, 2934, 3006, 3114, 3222, 3258, 3438, 3474, 3492, 3546, 3582, 3636, 3708, 3798, 3852, 3924, 4014, 4068, 4086, 4122, 4194, 4302, 4338, 4518, 4572, 4626, 4716, 4734, 4842, 4878, 4932, 4986, 5004, 5058, 5094, 5274, 5364, 5436, 5526, 5598, 5634, 5652, 5706, 5868, 5958, 6012, 6066, 6228, 6246, 6282, 6354, 6444, 6462, 6516, 6606, 6714, 6822, 6876, 6894, 6948, 7002, 7092, 7146, 7164, 7218, 7362, 7542, 7544, 7578, 7596, 7758, 7794, 7902, 7974, 8028, 8082, 8172, 8226, 8244, 8298, 8334, 8388, 8406, 8604, 8622, 8676, 8766, 8838, 8982, 9036, 9054, 9162, 9252, 9378, 9414, 9468, 9684, 9738, 9756, 9846, 9972, 10026, 10116, 10134, 10184, 10188, 10242, 10278, 10386, 10548, 10566, 10674, 10782, 10818, 10926, 11034, 11052, 11106, 11142, 11196, 11268, 11358, 11412, 11538, 11574, 11646, 11754, 11862, 11898, 11916, 12114, 12132, 12186, 12294, 12438, 12492, 12564, 12618, 12708, 12762, 12924, 12942, 13086, 13194, 13212, 13302, 13374, 13428, 13518, 13626, 13644, 13698, 13788, 13842, 13914, 14004, 14166, 14184, 14292, 14328, 14346, 14436, 14562, 14598, 14724, 14778, 14814, 14886, 14922, 15084, 15102, 15156, 15192, 15354, 15426, 15462, 15516, 15534, 15588, 15786, 15804, 15858, 15894, 15948, 15966, 16056, 16164, 16326, 16344, 16398, 16452, 16488, 16542, 16596, 16668, 16722, 16776, 16812, 16866, 16938, 17046, 17154, 17208, 17244, 17352, 17406, 17478, 17532, 17586, 17676, 17694, 17838, 17946, 17964, 18072, 18108, 18162, 18234, 18324, 18342, 18378, 18504, 18558, 18594, 18702, 18756, 18828, 18882, 18918, 18936, 19098, 19134, 19242, 19368, 19476, 19512, 19566, 19638, 19674, 19692, 19746, 19854, 19944, 19962, 20052, 20106, 20214, 20232, 20268, 20322, 20376, 20484, 20556, 20718, 20754, 20772, 20934, 21078, 21096, 21132, 21258, 21348, 21366, 21474, 21564, 21618, 21636, 21834, 21852, 21906, 22014, 22068, 22104, 22122, 22158, 22212, 22266, 22284, 22300, 22392, 22482, 22536, 22662, 22700, 22716, 22824, 22900, 22986, 23022, 23076, 23094, 23148, 23202, 23238, 23292, 23300, 23346, 23418, 23454, 23508, 23526, 23724, 23742, 23778, 23796, 23832, 23886, 23900, 24100, 24228, 24264, 24372, 24498, 24588, 24606, 24714, 24858, 24876, 24984, 25100, 25128, 25182, 25236, 25362, 25416, 25524, 25614, 25686, 25700, 25722, 25794, 25848, 25884, 25902, 26046, 26118, 26154, 26172, 26262, 26300, 26388, 26424, 26478, 26604, 26658, 26694, 26748, 26766, 26802, 26856, 26874, 26900, 26982, 27036, 27100, 27198, 27252, 27288, 27396, 27414, 27558, 27576, 27684, 27700, 27774, 27828, 27882, 27954, 28008, 28062, 28100, 28206, 28278, 28300, 28332, 28422, 28494, 28584, 28692, 28746, 28818, 28872, 28926, 28962, 29034, 29124, 29142, 29178, 29196, 29286, 29300, 29448, 29466, 29556, 29628, 29772, 29826, 29844, 29934, 30006, 30042, 30168, 30204, 30312, 30474, 30546, 30582, 30700, 30708, 30762, 30852, 30924, 30978, 31014, 31032, 31068, 31100, 31176, 31194, 31300, 31338, 31446, 31554, 31572, 31608, 31662, 31700, 31716, 31788, 31896, 31932, 31986, 32094, 32166, 32202, 32328, 32418, 32598, 32652, 32796, 32814, 32904, 32958, 33084, 33100, 33192, 33246, 33336, 33444, 33498, 33606, 33624, 33678, 33700, 33714, 33732, 33786, 33822, 33876, 34002, 34092, 34218, 34308, 34326, 34434, 34488, 34700, 34758, 34794, 34812, 34900, 34956, 35064, 35082, 35118, 35172, 35300, 35352, 35388, 35514, 35622, 35676, 35766, 35874, 35892, 35900, 35928, 35946, 35982, 36054, 36198, 36216, 36306, 36324, 36468, 36486, 36522, 36648, 36684, 36700, 36702, 36756, 36954, 37116, 37134, 37188, 37242, 37300, 37404, 37458, 37494, 37512, 37566, 37602, 37656, 37764, 37782, 37836, 37900, 37998, 38034, 38196, 38268, 38300, 38322, 38358, 38466, 38484, 38538, 38574, 38754, 38898, 38900, 38952, 39132, 39222, 39276, 39348, 39384, 39492, 39654, 39700, 39708, 39726, 39834, 39924, 39978]

There are 146 abundant numbers with an \( \textbf{odd}\) sum of divisors. These are up to 40000:

[18, 36, 72, 100, 144, 162, 196, 200, 288, 324, 392, 400, 450, 576, 648, 784, 800, 882, 900, 968, 1152, 1296, 1352, 1458, 1568, 1600, 1764, 1800, 1936, 2178, 2304, 2450, 2500, 2592, 2704, 2916, 3042, 3136, 3200, 3528, 3600, 3872, 4050, 4356, 4608, 4624, 4900, 5000, 5184, 5202, 5408, 5776, 5832, 6050, 6084, 6272, 6400, 6498, 7056, 7200, 7744, 7938, 8100, 8450, 8464, 8712, 9216, 9248, 9522, 9604, 9800, 10000, 10368, 10404, 10816, 11025, 11250, 11552, 11664, 12100, 12168, 12544, 12800, 12996, 13122, 13456, 14112, 14400, 15138, 15376, 15488, 15876, 16200, 16900, 16928, 17298, 17424, 18432, 18496, 19044, 19208, 19600, 19602, 20000, 20736, 20808, 21632, 22050, 22500, 23104, 23328, 23716, 24200, 24336, 24642, 25088, 25600, 25992, 26244, 26912, 27378, 28224, 28800, 28900, 30258, 30276, 30752, 30976, 31752, 32400, 33124, 33282, 33800, 33856, 34596, 34848, 36100, 36450, 36864, 36992, 38088, 38416, 39200, 39204, 39762, 40000]

The total number is 718

Note how I've marked 11025 in red. This is because it is the only odd number with an odd number of divisors. We have:$$11025 = 3^2 \times 5^2 \times 7^2 = 105^2 \text{ with 27 divisors}$$The next such number is 99225 where:$$99225=3^4 \times 5^2 \times 7^2 = 315^2 \text{ with 243 divisors}$$

Let's not confuse oddness and evenness of the divisor sums with the oddness and evenness of the numbers themselves. The majority of Zumkeller numbers are even. To quote from an earlier blog of mine:

In the range up to 100,000 there are 24362 even Zumkeller numbers comprising 24.362% of the range. However, there are only 208 odd Zumkeller numbers in that range, comprising 0.208%.

Thursday, 15 January 2026

What's Special About 28046?


Figure 1

Figure 1 shows a screenshot of a post that I uploaded on the 27th September 2022 in which I noted that the number 26840 contained all the even digits exactly once. Today I turned 28046 days old and this number is the next such number after 26840 with this property. There are only 96 such numbers overall and as I also noted in my blog post at the time:

"I'll only see another six such numbers in my lifetime: 28046, 28064, 28406, 28460, 28604, 28640."

THE 28046 MONUMENT: A COLOSSAL ACHIEVEMENT

So, one down and five to go with the next one only 18 days away. After that, there's a gap of slightly less than a year. The property of these numbers is very much base dependent of course but nonetheless interesting from a recreational mathematical perspective.

Wednesday, 7 January 2026

Code for Attractors, Vortices and Captives

Herein is an attempt to organise the code that I've gotten Gemini to write for me regarding attractors, vortices and captives.

Firstly, let's start with the ODD(+) and EVEN(-) algorithm. Here is a permalink to the code that will generate a list of attractors and vortices in decreasing order of their number of captives. It will also generate a summary and a colour-coded graphical display (see Table 1 and Figure 1). The default range is 0 to 40000.


Table 1: ODD(+) and EVEN(-)


Figure 1: red = attractor, orange = vortex, blue = captive

Secondly, let's continue with the ODD(-) and EVEN(+) algorithm. Here is a permalink to the code that will generate a list of attractors and vortices in decreasing order of their number of captives. It will also generate a summary and a colour-coded graphical display (see Table 2 and Figure 2). The default range is 0 to 40000.


Table 2: ODD(-) and EVEN(+)


Figure 2: red = attractor, orange = vortex, blue = captive

Thirdly, let's continue with the PRIME(+) and NON-PRIME(-) algorithm. Here is a permalink to the code that will generate a list of attractors and vortices in decreasing order of their number of captives. It will also generate a summary and a colour-coded graphical display (see Table 3 and Figure 3). The default range is 0 to 40000.


Table 3: PRIME(+) and NON-PRIME(-)


Figure 3: red = attractor, orange = vortex, blue = captive

Fourthly, let's continue with the PRIME(-) and NON-PRIME(+) algorithm. Here is a permalink to the code that will generate a list of attractors and vortices in decreasing order of their number of captives. It will also generate a summary and a colour-coded graphical display (see Table 4 and Figure 4). The default range is 0 to 40000.


Table 4: PRIME(-) and NON-PRIME(+)


Figure 4:  red = attractor, orange = vortex, blue = captive

Monday, 1 December 2025

Revisiting the Odd (-) and Even (+) Algorithm

Naturally, having revisited the odd (+) and even (-) algorithm and using Gemini to generate new code, the next step was to revisit the odd (-) and even (+) algorithm. In this latter algorithm, the sum of the even digits is added to the number while the sum of the odd digits is subtracted. In both cases, the attractors remain the sum but the vortices and captives will differ. Here a permalink to the SageMathCell code that will catalog the numbers from 0 to 40000. Here is a link to the code that Gemini created. I've put the output in a Google document for later reference.

Gemini asked if I'd like to generate a comparison table for the two algorithms. Here a permalink to the algorithm that it created and a link to the code in Gemini itself. Figure 1 shows the output for the range up to 40000. I also asked about the discrepancy in the count of attractors as they should be the same. Here is a link to Gemini's explanation.


Figure 1

As can be seen, even though the attractors are the same in both cases, the number of captives that they gather can be vastly different. The attractor 8987 claims 617 captives (the record) with odd (-) and even (+) but none at all with odd (+) and even (-).

The Secret Destiny of Numbers


It was only very early this morning that I created a post titled Revisiting the Odd (+) and Even (-) Algorithm and in it I mentioned the PDF file that I had uploaded to Academia. In this post I've embedded the video (located on YouTube) that NotebookLM created based on this PDF. It did a really good job of energising the content and presenting it in a novel and exciting way. Once again I'm impressed and looking forward to generating more videos from my store of over 900 mathematical blog posts.

Revisiting the Odd (+) and Even (-) Algorithm

I've written extensively about this algorithm in previous posts and even uploaded a PDF to Academia (link). For some reason I decided to reread this PDF and this motivated me to get Gemini Pro 3.0 to try its hand at writing some Python code to implement this algorithm across a chosen range of numbers. Of course, I'd already done this previously using SageMath but my algorithm timed out on SageMathCell above 100,000 and I thought that any code that Gemini created would be far more efficient than any code that I could write. I tested it out on SageMathCell for a range up to one million but it still timed out. However, on a range up to 100,000, it only took a few seconds. I tried to run the code in my Jupyter notebook using the range up to one million but it spat the dummy. No problem, I'm mainly interested in the range up to 40,000 given my focus on my diurnal age. Here is a permalink to the algorithm on SageMathCell,

Here was the prompt that I gave Gemini:

Implement the following program in Python. Here are the details:

\( \textbf{Odd Even Algorithm} \)

\( \textbf{The Basic Algorithm:}\)

Let’s describe the basic algorithm first. It takes 0 or any positive integer as input, computes the sum of the number’s odd digits and the sum of the number’s even digits. The sum of the number’s odd digits is added to the number while the sum of the number’s even digits is subtracted. This process is repeated until a stable number is reached, meaning the sums of odd and even digits are equal, OR a loop is entered. 

\( \textbf{Nomenclature:}\)

I’m choosing to call stable numbers (sums of odd and even digits are equal) ATTRACTORS because under the algorithm the trajectory of many numbers will lead to such an attractor. 0 is the first such attractor and 112 is the next.

Numbers that lead back to themselves I’m calling VORTICALS. An example is 11 because its trajectory is 11, 13, 17, 25, 28, 18, 11. Similarly 13 is a vortical because its trajectory is 13, 17, 25, 28, 18, 11, 13. All these numbers lead back to themselves and collectively I call this collection of verticals a VORTEX. It can be represented as [11, 13, 17, 25, 28, 18] but any vortical in it can be placed first and only the cyclic order needs to be preserved.

Numbers whose trajectories lead to a vortex or an attractor are called CAPTIVES. 9 is a captive of a vortex because its trajectory is 9, 18, 11, 13, 17, 25, 28, 18 leads it to the vortex [18, 11, 13, 17, 25, 28]. 

\( \textbf{Applying the algorithm to a range of numbers:}\)

I’m interested in selecting a range of numbers (let’s say from 0 to 100,000) and applying the algorithm to each number in this range. What I want to keep track of are:

  • Display list of attractors and their total number
  • Display list of the captives of each attractor and the number of these captives for each
  • Display a ranking of the attractors in order of number of captives (highest to lowest)
  • Display list of vortices (plural of vortex) together with the vorticals that comprise them
  • Display the captives of each each vortex and how many captives each has
  • Display of ranking of vortices in order of number of captives (highest to lowest)Display overall statistics: number of attractors, number of vorticals, number of captives of attractors, number of captives of vortices.

Gemini carried these instructions out perfectly as the implemented code revealed. Here is a link to its response. I ran the program using a restricted range up to 40,000 and copied the output to a Google document (link). I can now search this document to find details concerning an attractor or vortex. For example, consider these forthcoming attractors: 28019, 28037, 28055, 28073 and 28091. Here are the results concerning their number of captives:

  • 28019 has three captives (27951, 27971, 27993)
  • 28037 has no captives
  • 28055 has no captives
  • 28073 has no captives
  • 28091 has 138 captives (28100, 28102, 28104, 28106, 28108, 28110, 28111, 28112, 28113, 28114, 28115, 28116, 28117, 28118, 28121, 28123, 28127, 28129, 28139, 28140 ... and 118 more)

This of course is a very useful tool and I'll be making use of it for my diurnal number investigations. This was the summary generated for numbers in the range up to 40000:

  • Total Attractors Found: 1527
  • Total Vortices Found: 428
  • Total Unique Vorticals: 1451
  • Total Captives of Attractors: 20417
  • Total Captives of Vortices: 16610