Thursday 10 October 2024

The Prime Constant And Beyond

A recent Numberphile video informed me of the prime constant which firstly incodes all the primes within an infinitely long sequence of 0's and 1's as shown below:$$01101010001010001010001000001010000010001010001 \dots$$The leading zero corresponds to 1 which is not prime and the next two 1's correspond to 2 and 3 that are prime and so on. The next step is to add a decimal point in front of the leading zero to get:$$0.01101010001010001010001000001010000010001010001 \dots$$This represents a number between 0 and 1 and if we interpret this as a number in base 2 we have a constant that can be expressed as (permalink):$$ \begin{align} \text{Prime Constant } &= \frac{0}{2^1}+\frac{1}{2^2}+\frac{1}{2^3}+\frac{1}{2^4} + \dots \\ \\&\approx 0.414682509851112 \dots \end{align}$$Of course, we could equally well create the non-prime constant by representing every non-prime by a 1 and every prime as a 0. This gives:$$ \text{Non-Prime Constant } \approx 0.585317490148888 \dots$$The prime constant and the non-prime constant of course add to 1. The same idea can be applied to create other constants, for example a Fibonacci constant. The Fibonacci numbers are:$$1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, \dots $$This generates a series of 0's and 1's as follows:$$ 11101001000010000000100000000000010000 \dots$$It can be seen that the three leading 1's are there because 1, 2 and 3 are Fibonacci numbers whereas 4 is not and so it represented by a 0 etc. This gives (permalink):$$ \text{Fibonacci Constant } \approx 0.910278797207866 \dots$$It can thus be seen that all monotonically increasing sequences like the sequence of prime numbers and the sequence of Fibonacci numbers can be represented by a constant between 0 and 1. The base 2 representation is arbitrary but simple but other bases could be used especially to represent more than one sequence. For example, base 4 could be used to represent primes, square-free semiprimes and sphenic numbers. So a 3 could represent a square-free semiprime, a 2 could represent a sphenic number, a 1 could represent a prime and 0 could represent a number that is none of these. This leads to another constant, let's call it the 1-2-3 Factor Constant, where we have a series of 0's, 1's, 2's and 3's:$$011012100210122010102210020013102220 \dots$$These again are converted to a number between 0 and 1:$$0.011012100210122010102210020013102220 \dots$$Interpreting this as a number in base 4 leads to (permalink):$$ \begin{align} \text{1-2-3 Factor Constant } &= \frac{0}{4^1}+\frac{1}{4^2}+\frac{1}{4^3} + \dots \\  \\ &\approx 0.0796530489502776 \dots \end{align}$$There is endless fun to be had in generating these sorts of constants from multiple sequences.

No comments:

Post a Comment