Friday 8 March 2024

Quaternary Number System

The number associated with my diurnal age today, 27368, has the property that its prime factors contain only the digits 1, 2 and 3. Specifically:$$27368=2 \times 2 \times 2 \times 11 \times 311$$This got me thinking about what numbers in the range up to 333,321 contain only the digits 1, 2, 3 and have prime factors that also only contain the digits 1, 2, 3. It turns out that there are only seven such numbers and they are (permalink):$$ \begin{align} 132 &= 2^2 \times 3 \times 11\\312 &= 2^3 \times 3 \times 13\\11132 &= 2^2 \times 11^2 \times 23\\11232 &= 2^5 \times 3^3 \times 13\\13312 &= 2^{10} \times 13\\123132 &= 2^2 \times 3 \times 31 \times 331\\132122 &= 2 \times 31 \times 2131 \end{align}$$For brevity, I've written the factorisation in base-index format and so digits greater than 1, 2, 3 appear but these of course disappear when the factorisation is not written in base-index format.

The appearance of the digits 1, 2, 3 only is reminiscent of the quaternary number system even though what is written previously is in base 10. The quaternary equivalents of the previous decimal numbers are:$$ \begin{align} 132 &= 2010_{4}\\312 &= 10320_4\\11132 &= 2231330_4\\11232 &= 2233200_4\\13312 &= 3100000\\123132 &= 132003330_4\\132122 &= 200100122_4 \end{align} $$The factorisation of the quaternary numbers will contain the same number of factors and single digit factors will remain the same but multidigit factors will appear as their quaternary equivalents. Thus:$$ \begin{align} 13312 &= 2^{10} \times 13 \text{ and}\\3100000_4 &=2_4^{22_4} \times 31_4 \end{align} $$Of course, the quaternary number system also contains the digit 0 and so it's fair to ask what numbers up to 333,210 contain all the digits 0, 1, 2 and 3 (multiplicity allowed) and have prime factors that also contain only these digits (again with multiplicity allowed). It turns out that there is only one such number in the range up to one million. It is:$$133012 = 2^2 \times 11 \times 3023$$I thought I'd ask Google's Gemini about the quaternary number system.
Can you give me some interesting facts about and uses of the quaternary or base 4 number system?

The quaternary (base-4) system, while not as common as binary or decimal, holds some interesting properties and potential uses. Here are some fun facts and applications:

Interesting Facts:
  • Fewer Digits: Compared to binary, quaternary uses fewer digits to represent the same numerical value. For example, 10 in binary is 1010, while in quaternary it's simply 22.
  • DNA Connection: The four building blocks of DNA (Adenine, Guanine, Cytosine, and Thymine) can be seen as a quaternary system, with each combination representing a specific unit of genetic information.
  • Error Detection: Quaternary finds some niche applications in fault-tolerant computer systems. By using 4 possible states (0, 1, 2, 3) instead of 2 in binary, it allows for additional error detection and correction mechanisms.
Potential Uses:
  • Educational Tool: Quaternary can be a stepping stone for learning binary. Due to its simplicity (using only 4 digits), it can be easier to grasp the concept of positional number systems before moving to binary's base-2 system.
  • Space Exploration: Some proposals for future spacefaring computers suggest using quaternary systems due to their potential radiation hardness. Quaternary systems might be more resistant to the corrupting effects of cosmic radiation compared to traditional binary systems. (This is an area of ongoing research)
  • Signal Processing: Quaternary can be used in certain signal processing applications where reducing the number of states while maintaining some level of complexity compared to binary might be beneficial. However, extensive binary infrastructure makes widespread adoption less likely.
Overall, the quaternary number system offers a unique perspective on representing numbers. While not as widely used as binary or decimal, it has interesting properties and potential applications in specific areas like education, fault-tolerant systems, and possibly even future space exploration.

Here is some further information about the connection with DNA taken from this source:

Parallels can be drawn between quaternary numerals and the way genetic code is represented by DNA. The four DNA nucleotides in alphabetical order, abbreviated A, C, G and T, can be taken to represent the quaternary digits in numerical order 0, 1, 2, and 3. With this encoding, the complementary digit pairs 0↔3, and 1↔2 (binary 00↔11 and 01↔10) match the complementation of the base pairs: A↔T and C↔G and can be stored as data in DNA sequence. For example, the nucleotide sequence GATTACA can be represented by the quaternary number 2033010 (= decimal 9156 or binary 10 00 11 11 00 01 00).

No comments:

Post a Comment