Thursday, 11 December 2025

Nothing in Common

Looking at the number associated with my diurnal age today, 28011, I noticed that its prime factors (3 and 9337) contain none of the digits of the number itself. I wondered how many numbers from 1 up to 40000 share this property. It turns out that 1996 numbers do (permalink) including a near neighbour of 28011, namely 28009 with prime factors of 37 and 757. The first such number is 4 since it is composite and has only one prime factor (2). Table 1 shows the results for the suitable numbers between 28000 and 29000. All except 28509 are biprimes or triprimes.


Table 1

Now these two neighbours (28009 and 28011) are different when it comes to their proper divisors. Let's compare:$$ \begin{align} 28009 &\rightarrow 1, 37, 757 \\ 28011 &\rightarrow 1, 3, 9337 \end{align}$$The proper divisors of 28009 have no digits in common with the digits of the number but the proper divisors of 28011 do (the digit 1). Again I wondered how many other numbers share this property with 28009. Well, it turns out that this property is a little less common than that of the prime factors because none of the numbers can contain the digit 1. In fact, in the range up to 40000, there are only 300 numbers that satisfy compared to 1996 for the prime factors (permalink). All are biprimes and are a subset of the numbers we obtained for the prime factors. Table 1 shows such numbers in the range between 28000 and 29000.


Table 2

So that's it, just something interesting in the domain of recreational mathematics.

Tuesday, 9 December 2025

The Cantor Ternary Set Revisited

It was back in January 2nd of 2022 (almost four years ago now) that I posted about The Cantor Ternary Set. I began the post with the following statement:

Today I turned 26572 days old and discovered that \( \dfrac{1}{26572} \) is in the Cantor set.


Infographic created using NotebookLM

In the context of the Cantor ternary set, 26572 is referred to as a \( \textbf{primitive} \) number and as such belongs to OEIS A173793. These numbers are not multiples of 3 as some of the other numbers are that belong in this set. The next such number is \( \textbf{28009} \), my diurnal age today. The initial members of this sequence are:

1, 4, 10, 13, 28, 40, 82, 91, 121, 244, 328, 364, 730, 757, 820, 949, 1036, 1093, 2188, 2362, 2812, 2920, 3280, 6562, 6643, 7381, 9490, 9841, 19684, 20440, 26248, 26572, 28009, 29524, 59050, 59293, 63973, 65620, 66124, 66430, 84253, 88573, 177148

As can be seen, after 28009, there is only one other number that I'm likely to experience in my lifetime and that is 29524. However if we include numbers in the Cantor set that are multiples of 3 then there are many more terms and these constitute OEIS A121153. Between 26572 and 29524, we have the following numbers as shown in Table 1 where the numbers (primitive and non-primitive) are shown together with their factorisations and the representation of their reciprocals in ternary format:


Table 1: permalink

For the non-primitive numbers, the factor of 3 is recurrent whereas in the primitive numbers it is absent. Here is a link to a video (uploaded to YouTube) that I got NotebookLM to create for me about the Cantor ternary set and below is the video:

Monday, 8 December 2025

New Project

As I've written in earlier posts, the site \( \textbf{Numbers Aplenty}\) has been unreliable for quite some time now, often going down for days. For this reason, I developed a SageMath program that produced a similar but even more extensive output. It does the job but my coding skills are somewhat primitive and I made the mistake of getting Gemini to revise my code which it struggled with. It seems that Gemini is more comfortable coding in Python rather than SageMath that is built on top of Python. Sometime the SageMath code malfuntioned. I think it's better to get Gemini to stick with Python when coding.

I asked Gemini the following question:

Numbers Aplenty is a website that I regularly make use of but of late it has become increasingly unreliable because of down time. Is it possible to create a Python program that replicates the output of Numbers Aplenty and also allows me to add additional output of my own. I’m just asking about the feasibility of such a program, you don’t have to create any code. The URL is numbersaplenty.com.

 Yes, it is absolutely feasible to create a Python program that replicates the functionality of Numbers Aplenty. In fact, this is an excellent project for Python because the language excels at the exact type of tasks the website performs: handling large integers and running logical checks.

Here is a breakdown of why this is feasible and how you would likely approach it:

1. Python is Built for This

  • Arbitrary Precision Integers: Unlike many other languages, Python handles massive integers automatically. If you want to check a number with 50 digits (far beyond Numbers Aplenty's 15-digit limit), Python can handle it natively without needing special code.

  • No Downtime: Since the code runs locally on your machine, you never have to worry about the website being offline.

2. Libraries Do the Heavy Lifting

You would not need to write the complex math from scratch. The Python ecosystem has powerful libraries that already "know" number theory:

  • SymPy: This is the most critical library for your goal. It is a symbolic mathematics library that includes built-in functions for:

    • is_prime(n) (Checks if a number is prime)

    • factorint(n) (Finds prime factorization)

    • divisors(n) (Lists all divisors)

    • is_square(n), is_perfect(n), etc.

  • NumPy: Useful if you decide to generate generating arrays or grids of numbers for comparison.

3. Replicating the "Families" (The "Aplenty" Part)

The website categorizes numbers into families (e.g., "Happy Numbers," "Fibonacci Numbers," "Palindromic Numbers").

  • Standard Families: Checking if a number is a Fibonacci number or a Palindrome is trivial in Python (often 1–3 lines of code).

  • Exotic Families: For the more obscure types (like "Vampire numbers" or "Zigzag numbers"), you can look up their definitions (often found on the OEIS - On-Line Encyclopedia of Integer Sequences) and write a small function for each.

    • Example logic: "If the sum of the digits squared equals 1 (eventually), mark as Happy Number."

4. Customization (Your Requirement)

You mentioned wanting to add your own output. This is the biggest advantage of a custom script. You could design your program to:

  • Output data in a specific format (JSON, CSV, or a readable text report).

  • Run specific checks that Numbers Aplenty doesn't have.

  • Batch process hundreds of numbers at once (which would take forever on a web interface).

Summary of Feasibility

FeatureFeasibility in PythonDifficulty
Basic Properties (Odd, Even, Digits)Very HighTrivial
Number Theory (Primes, Factors)Very HighEasy (using SymPy)
Replicating 170+ FamiliesHighModerate (requires time to write checks for each)
SpeedHighFast for <20 digits; slower for massive numbers
Adding Custom OutputVery HighEasy

Conceptual Workflow

If you were to commission or build this, the program structure would look like this:

  1. Input: User enters a number (e.g., 1729).

  2. The "Checker" Engine: The number is passed through a list of functions:

    • check_prime(1729) -> False

    • check_taxicab(1729) -> True

    • check_harshad(1729) -> True

    • ...plus your custom checks.

  3. Output: The program prints a report combining the standard results with your custom metrics.

Verdict: Highly feasible. The "hard" part is just the manual labor of coding the definitions for the hundreds of specific number types you might want to track.

Getting Gemini to code in Python from scratch is much preferable to its revising code that I've written. I can gradually build up a list of functions that I want the program to execute in a Jupyter notebook. It will produce output similar but more extensive than Numbers Aplenty, it will not require Internet access, it will be efficiently coded and the code can be easily modified whenever necessary.

Wednesday, 3 December 2025

The Magic Flower

While Nano Bananas has been doing a rather poor job of translating my image prompts into what I want, it did a pretty good job in dealing with what I wanted this image transformed into. Figure 1 shows the original image as it is appeared in a Cliff Pickover tweet.


Figure 1
This was my prompt:
This image, showing the numbers from 1 to 81 connected by lines, has been referred to as a magic flower. Can you enclose each number shown in a circle just large enough to contain the number and retaining the white background. Outside of these circles, I want the petals coloured in soft rainbow colours. The number at the centre, 41, should also be surrounded by its small circle but this central area, outside the circle containing 41 but inside the outer boundary, should be coloured yellow. The area outside the petals to the edges of the image should remain while and any text or imperfections should be removed.
Figure 2 shows the satisfying result that is clearly much more visually appealing than the original and the numbers are also easier to identify. This is what Cliff added in his tweet: 
"Magic flower."  Each line segment sums to 123.  Example: 6 + 37 + 80 = 123.  Each numerical entry, from 1 to 81, is depicted only once in the figure.

Figure 2

For once, Nano Bananas delivered the goods. It clearly works better when an actual image is provided that you want modified. For example, in my previous post titled 28003: A Lesson Learned, the program kept creating the number 2803 instead of 28003, despite repeated requests to correct the error. In the end I gave up and got ChatGPT to create what I wanted and that's where the image in the blog post came from. I think what I should have done was to make a rough sketch of what I wanted and uploaded that. I'll do that in future.

28003: A Lesson Learned

One of the limitations of the free version of the Airtable online database is that it only allows about 1000 records per database. Once the limit is reached, you need to create a new database to accommodate your needs. I've been using Airtable for years now and I am into my third database:

This is an impressive combined database containing about 3000 records. However, the records are in three disconnected databases and once I move on to a new database, I've tended to ignore the earlier databases. However, I realised the folly of doing this when confronted with something interesting to say about the number associated with my diurnal age today: \( \textbf{28003}\).


It's not dark yet but it's getting there

The OEIS, Mathematical Meanderings (my Mathematics blog), Bespoken for Sequences and Diurnal Age Part 3 (in short all my usual sources) had nothing useful to contribute. It then occurred to me to look back at my Diurnal Age Part 2 database and I was pleasantly surprised at what I found therein. Let's begin:

  • \( \textbf{28003} \) is a member of OEIS A179248: numbers that have 8 terms in their Zeckendorf representation: [3, 8, 89, 233, 610, 2584, 6765, 17711]. There is in face a cluster of sequence members nearby, namely 27800, 27802, 27804, 27807, 27808, 27809 and 27811.

  • \( \textbf{28003}\) is a member of OEIS A157344: semiprimes that are the product of two distinct Sophie Germain primes. Approximately 2.52% of numbers in the range up to 40,000 satisfy this criterion. Here the primes are 41 and 683 and we have:
    • 41 x 2 + 1 = 83 which is prime
    • 683 x 2 + 1 = 1367 which is prime

  • \( \textbf{28003}\) is a member of OEIS A082957: numbers \(n\) such that \( \sigma(2n) < \sigma(2n+1) \). These numbers total 5.52% in the range up to 40,000. There are 2301 primes and 3169 composites among the 5470 first terms. Here we have:
    • \( \sigma(2 \times 28003) = \sigma(56006) = 86184\)
    • \( \sigma(2 \times 28003 + 1) = \sigma(56007) = 94848\)

  • \( \textbf{28003} \) is a member of OEIS A134252: positions of 2 after decimal point in decimal expansion of \( \frac{1}{\pi}\). 

Diurnal Age Part 1 yielded no results but as can be seen Diurnal Age Part 2 revealed membership of \( \textbf{28003}\) in four different OEIS sequences.

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.