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. 

No comments:

Post a Comment