I've written about the factorial number system in two previous posts:
- Factorial Number Base on March 31st 2018
- Factorial Number System on September 2nd 2020
It is a mixed radix number system and so is the primorial number system that uses the primorials (progressive products of primes):
- 2
- 2 x 3 = 6
- 2 x 3 x 5 = 30
- 2 x 3 x 5 x 7 = 210
- 2 x 3 x 5 x 7 x 11 = 2310
- 2 x 3 x 5 x 7 x 11 x 13 = 30030
- 2 x 3 x 5 x 7 x 11 x 13 x 17 = 510510
- 2 x 3 x 5 x 7 x 11 x 13 x 17 x 19 = 9699690 etc.
It's easy enough to set up an algorithm in SageMath that will convert decimal number to primorial digits. In decreasing order, the primorials below ten million are 9699690, 510510, 30030, 2310, 210, 30, 6 and 2. These numbers can serve as bases to represent any number up to 10,242,789 (which has representation as 111111111). Here is the algorithm (permalink) that will return the primorial base representation of any number up to 10,242,789. The example returns the representation for numbers the numbers 27717 and 27718 (where we don't need any primorials above those numbers):
P=[2310,210,30,6,2]for number in [27717..27718]:original=numberN=[]for p in P:N.append(number//p)number=number%pif is_odd(original):N.append(1)else:N.append(0)primorial=""for n in N:primorial+=str(n)+" "print(original,"-->",primorial)27717 --> 11 10 6 4 1 127718 --> 11 10 6 4 2 0
Notice the spaces between the base-10 numbers in the primorial base representation (although colons are more commonly used) where:
27717 = 11 x 2310 + 10 x 210 + 6 x 30 + 4 x 6+ 1 x 2 + 127718 = 11 x 2310 + 10 x 210 + 6 x 30 + 4 x 6 + 1 x 2 + 0
For more information see this source. For any number in the range up to 40000 that I focus on, the letter A can be used for 10 and the letter B for 11 can be used. Additional letters can be used for larger numbers (up to a point). The colons, spaces or other separators are then not needed and the resultant single digits can be concatenated without ambiguity. Thus:2771710→BA6411primorial2771810→BA6420primorial
However, it needs to be remembered that the numbers on the right (directly above) are not base 12 numbers and that the digits are merely convenient placeholders. To emphasise this, consider the base 12 equivalents of 27717 and 27718:2771710→14059122771810→1405A12
So what stimulated my interest in primorial number systems? Well, like most of my posts, it was prompted by my analysis of the number representing my diurnal age. Today I turned 26250 days old and this number has a striking factorisation:26250=7×54×3×2
The first entry for this number in the OEIS is A276086:
A276086 | Prime product form of primorial base expansion of n: digits in primorial base representation of n become the exponents of successive prime factors whose product a(n) is. |
It took me some time to understand what this meant. In the case of 26250, n=57 and its primorial base expansion is 1411. The resulting digits because the exponents of successive prime factors that multiply together to give 26250. In other words:71×54×31×21=26250
No comments:
Post a Comment