Tuesday, December 27, 2022

Could PI Be A Rational Number?

This is not a normal post for me. Sometimes a combination of observations interest me and generate a train of thought that occupies my idle thoughts for a while. It often helps me to try to explain my thoughts as a way to guide my reasoning which is why I'm writing this post.

My mathematical skills are limited and I would guess that a mathematician could easily answer my simple question.

In math, a fractional number with no repeating number or recurring sequence of digits is called irrational. In decimal, PI is an irrational number. My question is: Is there any base/radix where would PI would not be irrational?

My guess is that the answer is no, PI will always be irrational. But working with computers has shown me that numbers that are irrational in decimal are not necessarily irrational in another base and that decimal numbers that are not irrational may be irrational in another base. (See further below for a further explanation of bases).

Here is a simple example comparing a fraction (one third) in decimal (base 10) and the same fraction (one third) in trinary (base 3).

The decimal fraction 1/310 is written in decimal as 0.3333...10. The digits 3333... at the end recur an infinite number of times. When dealing with numbers in multiple bases the base is written as a subscript. The equivalent of the decimal fraction for one third (1/310) is written in trinary as 1/103 (again, see below). So one third is written in decimal as 1/1010 or 0.3333310 and in trinary the same one third is written as 1/103 or 0.13.

This is a simple example of an irrational fraction in decimal that is a simple number in trinary. My guess is that PI is probably always an irrational number, but I would like to hear why that has to be true. If there is a base where PI is not irrational, does that generate additional questions or novel solutions to other questions?

If there is a base where PI is not rational I'm guessing it would be a base that is a prime number or some exotic, non-integer base.



If you are interested, here are some further explanations of number bases.

As we learned in grade school, decimal numbers are made up of 10 digits, 0 thru 9.

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, etc

Numbers in binary (base 2) are made up of digits 0 thru 1 and numbers in trinary (base 3) are made up of digits 0 thru 2. There are many other commonly used bases such a octal (0 thru 7) and hexadecimal (0 thru F). I would guess there are an infinite number of bases and some bases are not just sequences of integers.

When numbers are written the base can be shown with a subscript. 12 means binary, 13 means trinary and 110 means decimal. A number without a subscript is assumed to be decimal.

Here are the beginning numbers for decimal, binary, trinary, octal, hexadecimal so you can see the differences. Octal and hexadecimal are basically just different (more compact) ways to represent binary numbers and are shown here just because I wanted to show them. Decimal and trinary were used in discussions above.

decimal10  binary2  trinaryoctal8  hexadecimal16
1        1      1     1     1
2       10      2     2     2
3       11     10     3     3
4      100     11     4     4
5      101     12     5     5
6      110     20     6     6
7      111     21     7     7
8     1000     22    10     8
9     1001    100    11     9
10    1010    101    12     A
11    1011    102    13     B
12    1100    110    14     C
13    1101    111    15     D
14    1110    112    16     E
15    1111    120    17     F
16   10000    121    20    10

and so on

While thinking about this problem, I used the simple number line from grade school to explore some issues.  (Sorry, the blog editor doesn't allow accurate placement of the arrow, but you get the idea.)

Below I show decimal 3 1/3 on a decimal number line and a trinary number line.

In school we used decimal integer number lines like
+4     +3     +2     +1     0      -1     -2     -3

|______|______|______|______|______|______|______|
    
3 1/3 or 3.3333... in decimal approximately

We can expand the section of the number line from 4 to 3 and then sub-divide.

+4.0   +3.9   +3.8   +3.7   +3.6   +3.5   +3.4   +3.3   +3.2    +3.1  +3.0

|______|______|______|______|______|______|______|______|______|______|
                                                                                        ↑
                                                                    3 1/3 or 3.3333... in decimal approximately

We can expand the section of the number line from 3.4 to 3.3 and then sub-divide.

+3.4   +3.39  +3.38  +3.37  +3.36  +3.35   +3.34 +3.33  +3.32  +3.31   +3.3

|______|______|______|______|______|______|______|______|______|______|
                                                                                        ↑
                                                               3 1/3 or 3.3333... in decimal approximately

We can keep expanding and sub-dividing, but we would never find a place to draw a line for exactly 3.3333.... We could get closer and closer, but we can never get to decimal 3 and 1/3.

If we try a number line again using trinary, we easily find a precise spot.

+11.0  +10.2  +10.1  +10.0
|______|______|______|
                             ↑
Decimal 3 1/3 in trinary exactly