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
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, 2731Write 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: