Friday, 9 October 2026

23 Revisited

The number 23 never ceases to be of interest. Back in November of 2020 I made a post titled Twenty Three in which I looked at some of the properties of this prime number. These included the following:

  • 23 and 239 are the only integers requiring nine positive cubes for their representation
  • 23 has a reciprocal with a period of 22
  • 23 features in and is central to the birthday paradox
  • 23 is a Sophie Germain and safe prime
  • 23 forms part of the first Cunningham chain 2, 5, 11, 23, 47
  • 23 is the smallest odd prime that is not a twin prime
  • 23 is the second Woodell prime (the first is 7)
  • 23 is a factorial prime equal to 4! -1
  • 23 is the second Smarandache–Wellin prime (the first is 2)
  • 23 divides 874, the sum of the first 23 primes
  • 23 is the length of the repunit prime 11111111111111111111111
  • 23 is the only prime \(p\) such that \(p!\) is \(p\) digits long
  • 23 is conjectured to be the only pointer prime that does not contain a 1
The number associated with my diurnal age today, 28313, caught my attention because the number 23 stood out:$$ \textcolor{red}{2}8\textcolor{red}{3}13 = \textcolor{red}{23} \times 1\textcolor{red}{23}1 $$I wondered how common this sort of pattern was so I asked Gemini to write a program to find out. This was the prompt:
Write a program in SageMath that determines all the composite, positive integers in a given range that contain the digits 2 and 3 in ascending order from left to right (but not necessarily consecutively) and whose prime factors also all contain the digits 2 and 3 in ascending order but not necessarily consecutively. The default range can be from 1 to 40000. The output should a table showing number and factors followed by a comma-separated list of the qualifying numbers.

Here is a permalink to the program that returned only one result: 28313. Extending the range to 100,000 gives us the following numbers:

Number     | Prime Factors
--------------------------------------------------
28313      | 23, 1231
52739      | 23, 2293
58213      | 23, 2531
62399      | 23, 2713
62813      | 23, 2731

It is only when we extend the range to one million that we find numbers such that the 23's  are all formed from consecutive digits. I modified the prompt and got Gemini to create a new program:
Write a program in SageMath that determines all the composite, positive integers in a given range that contain the digits 2 and 3 consecutively in ascending order from left to right and whose prime factors also all contain the digits 2 and 3 consecutively in ascending order. The default range can be from 1 to one million. The output should be a table showing number and factors followed by a comma-separated list of the qualifying numbers (permalink).

Here are the results when the program is run: 

123257, 235129, 282923, 286823, 442313, 523381, 533623, 542363, 547423, 552329, 555239, 563323, 672313, 902359, 985823

Number       | Prime Factors
--------------------------------------------------
123257       | 23, 233
235129       | 23, 10223
282923       | 23, 12301
286823       | 233, 1231
442313       | 23, 19231
523381       | 223, 2347
533623       | 23, 23201
542363       | 23, 23581
547423       | 23, 23801
552329       | 239, 2311
555239       | 233, 2383
563323       | 239, 2357
672313       | 23, 29231
902359       | 23, 39233
985823       | 233, 4231

These numbers of course are far beyond what my diurnal age will ever reach but we can identify 29231 as a special number because it contains the digit sequence 23 and when multiplied by 23 produces a new number, 672313, that also contains the digit sequence 23. I may reach this number but it's doubtful whether I'll reach the next (39233) that has the same property. 

Thursday, 8 October 2026

When Dates and Days Align

I put this little problem to Gemini:

A person is born on April 3rd 1949. The day that he is born is reckoned as Day 0 and for every subsequent day 1 is added and this count becomes his diurnal age. Let the number associated with any date be determined as DDMYY where DD is the number associated with the month(1 to a maximum of 31), M is the month (from 1 to 9) and YY is the last two digits of the current year. Thus a date of 14th September 2026 would become 14926. Is there any date, using this system, where the diurnal age equals the date?

Here was its response:

September 23, 2014, is the sole date where the diurnal age mathematically equates to its DDMYY numerical representation. 

That is interesting and so, on the 23rd of September 2014, I was 23914 days old. I got Gemini to write a program that would accept any birthdate as input using this prompt:

Can you write a program in SageMath that will accept any birthdate as input and from there calculate if there is a date where the diurnal age equals the date number using DDMYY format. Let’s realistically limit the person’s possible age to less than 100.  

Here is a permalink to the program and the result for the following birthdate:

  • 23rd August 1964:
    Match found: 05 February 1979 | Diurnal Age / Date Number: 5279
However, I realised that I could be less restrictive with the date format and modified the prompt as follows:
I’d like to modify the program so the acceptable date format can be DMMYY, DDMYY or DMYY. This ensures that the resultant number derived from the date is always less than six digits. Everything else remains the same.

Here is a permalink to the modified program which produces the same results for the two dates examined above. Here are some additional dates:

  • 23rd November 1980:
    Match found: 06 July 1999 | Diurnal Age: 6799 | Date Format: 6799
    Match found: 16 January 2025 | Diurnal Age: 16125 | Date Format: 16125

  • 6th October 2002:
    Match found: 10 September 2032 | Diurnal Age: 10932 | Date Format: 10932

So just a little curiosity. Not all birthdates yield a result within the span of 100 years. You could ask the person born on the 6th October 2002: h
ow many days old will you be on the 10th September 2032? Don't know? Here's a way to find out:
  • 10th \( \rightarrow\) 10
  • September \( \rightarrow\) 9
  • 2032 \( \rightarrow\)  32
  • Concatenation \( \rightarrow\) 10932 \( \rightarrow\) your diurnal age!