Using irrational fractional counting systems to generate chaotic behavior.
Published
February 9, 2021
Modified
February 12, 2025
This post assumes you have read the first, which introduces generalized polynomial counting, and the second, which restricts the focus and specifies the general aim.
Extra Metals
As previously shown, the golden ratio (recurrence \langle 1, 1|) can be generalized in several ways. The silver ratio was introduced as the next “metallic mean”, a sequence of quadratic roots of the form \langle n, 1|, and the limiting ratios of the corresponding recurrences.
\begin{gather*}
\langle n, 1| ~~\iff~~ x^2 - nx - 1 \\
x^2 = nx + 1 ~~\implies~~
x = n + \frac{1}{x} \\
x = n + \cfrac{1}
{n + \cfrac{1}
{n + \cfrac{1}
{n + \cfrac{1}{\ddots}}
}
}
= [n; \underline{n}]
\end{gather*}
Again, the underline denotes repetition, since the overbar has been used for negation.
Parametrizing the carry in both terms (recurrence \langle n, n|) demonstrates a strange duality with the above continued fraction:
\begin{gather*}
\langle n, n| ~~\iff~~ x^2 - nx - n \\
x^2 = nx + n ~~\implies~~
x = n + \frac{n}{x} \\
x = n + \cfrac{n}{n + \cfrac{n}{n + \cfrac{n}{n + \cfrac{n}{\ddots}}}} =
n + \cfrac{\textcolor{red}{\cancel{n}}}
{\textcolor{red}{\cancel{n}} + \cfrac{\textcolor{red}{\cancel{n}}}
{n + \cfrac{\textcolor{blue}{\cancel{n}}}
{\textcolor{blue}{\cancel{n}} + \cfrac{\textcolor{blue}{\cancel{n}}}{\ddots}}
}
} \\
x = n + \cfrac{1}
{1 + \cfrac{1}
{n + \cfrac{1}
{1 + \cfrac{1}{\ddots}}
}
}
= [n; \underline{1, n}]
\end{gather*}
In other words, the root of \langle n, 1| has continued fraction n repeating, and the root of \langle n, n| has continued fraction n, 1 repeating.
Gray Silver
The golden ratio belongs to both series. After it, the next term in in the non-metallic series is the recurrence \langle 2, 2 |. It produces the series 0, 1, 2, 6, 16\dots (OEIS A002605), and the limiting ratio of its successive terms is 1 + \sqrt 3 \approx 2.7321\dots. This value and the polynomial coefficients are bounded above by 3, so it stands to reason that a ternary alphabet is suitable. The trick for expanding 3 works as before:
As an homage to heraldry terminology, I choose to call this system cendrée, and the root of the polynomial the ashen ratio (abbreviated κ). Gold and silver (“or” and “argent”) are “metals”; cendrée is a non-standard color referring to an ashen gray, which reflects its relationship to the metallic means.
Ash on the Fulcrum
Just like the silver ratio base, we can try expressing these using a balanced alphabet {-1, 0, 1} instead of the standard one {0, 1, 2}. There, we had the choice of forbidding either the string “11” or “10”, because when the carry was applied to either, the negative of the other would appear. Just like then, we must choose whether to forbid “11” or “TT” (its negative), since carrying at one produces the other.
By iteratively applying the carry, we get a repeating balanced expansion. Instead of this, we could derive an expansion by decrementing the expansion of three
for which we get the same expansion after recursing on the symbol “2”.
Both of the above derivations involve an infinite number of steps, so there might still be some nagging suspicion that the methods used are invalid. To put it on firm(er) ground, we can derive the carry polynomial directly from this series (and vice versa) using a geometric series argument:
Recall that in decimal, repeating expansions usually signify rational numbers, like 0.\underline{3}_{10} = 1/3. Similarly, we can interpret “1\bar{1}.\underline{1\bar{1}}” as a base three expansion by evaluating x^2 / ( x + 1 ) at three, getting 1\bar{1}.\underline{1\bar{1}}_3 = 9/4 = 2.25_{10}. Normally, the rule is that when the denominator of a rational number and base are coprime (in the first example, three and ten; in the second, four and three), its expansion repeats. But two in the irrational base κ breaks that rule in a balanced alphabet.
Mixing Ashes
Naively, we can convert each entry of the earlier table to a balanced form by replacing “2”s with (shifts of) the repeating expansion. But notice that each listed fractional expansion above three appears to end in “2”. In contrast, the silver ratio expansions ended in both “1” and “2”.
While this isn’t a problem with the fractional base on its own, it complicates things when considering the balanced alphabet. In fact, it seems to be the case that all base κ expansions of integers above three terminate in “2”, but I won’t bother proving it (see note for a sketch1).
Instead of converting directly, we can also just try counting from zero again, remembering the aforementioned trick for converting “2”, but we may get problems when “2” appears multiple times in the expansion. Alternatively, by applying a finite version of the rule, we can move “2” further and further to the right.
n (Decimal)
n (Mixed Cendrée)
n (Balanced Cendrée)
Remark
0
0
0
1
1
1
2
2
1T. 1T…
2
1T.02
1T. 1T…
Example of pushing “2” to the right
3
10.02
10. 1T…
4
11.02
11. 1T…
5
12.02
11. 1T…
5
1T0.02
1T0. 1T…
Carry “012” to “1T0”
6
1T1.02
1T1. 1T…
7
1T2.02
1T2. 1T…
7
10T.1102
10T.11 1T…
Push “02000” to “1T1T02”
8
100.1102
100.11 1T…
9
101.1102
101.11 1T…
10
102.1102
102.11 1T…
10
110.T102
110.T1 1T…
Carry “2.1” to “10.T”
11
111.T102
111.T1 1T…
12
112.T102
112.T1 1T…
12
2T0.T102
Carry “012” to “1T0”
12
1T0T.001102
1T0T.0011 1T…
Push “0200000000” to “1T1T1T1T02”
Between some rows of the table, we have to apply the carry slightly more greedily – on the strings “21” and “12” as well as “22”. In fact, looking slightly ahead to fifteen, we have to use another trick:
In other words, “2” should only be pushed to the right as far as an occurrence of “11”, since at that point we can carry.
It remains to be proven that all but the rightmost “2” can be eliminated from a balanced expansion, but good “pushes” appear to suffice.
-ary to -adic
We can convert a repeating expansions back into the ratio of two integers by using a fairly simple procedure. Here, we apply that procuedure is applied to both 0.\underline{69}_{10} and the string in question, “0.\underline{1\bar{1}}_{p}”, for generic p:
These fractions can be used to construct p-adic numbers. Doing so requires us to realize that p + 1 always divides p^{2n} - 1. Doing the long division directly for some small n, we get:
If we assert p^\infty approaches zero (regardless of whether p is greater than or less than 1), then in the limit we have the quotient \bar{1}_p / 11_p = \dots 1\bar{1}1\bar{1}1\bar{1}_p.
Flip it Radix-ways
The series we’re actually interested in is 1_p / 11_p, which is the negative of the above series. Since we’re using a balanced alphabet, we can negate this by simply replacing \bar{1} with 1 (and vice versa), producing…
This gives us the defining relation of κ, so the expansion appears to be correct.
Two Plus Two Equals Chaos
p-adic expansions are still expressions in the base p, so the carry rule still applies. However, since the carry continues to infinity, we have a necessarily limited view, which we can at best combat by marking repeating sections.
While the κ-adic expansion for two can be incremented once to produce a valid expansion one for three, problems arise when attempting to construct four. The most direct method is to start with the symbol “4” and manipulate it:
Latin characters used as numerals start at A for ten, as in hexadecimal. As we carry to the left, the most significant digits (which I call the “carry head”) grow larger without bound. However, in doing so, a residual “1” (marked in red) is left behind in the fourth place value.
In typical p-adics, p is an integer, and the carry head is a single digit wide. κ is not an integer, and the carry head here is two digits wide. This may seem a little dubious, but truncating immediately to the right of the carry head will produce the same effect regardless of its size.
Alternative Constructions
To keep the head small, it would be nice if it were taken mod an integer. Both \bar{1} and 1 are odd, so one might hope that in between carries, we could mod out by two. Unfortunately, this is not the case. All of the expansions above are identically four, and manipulating the digits directly would just give a different number.
Instead, we could try representing “4” in a more direct manner. There are a few other options available.
Add the nonrepeating part of the mixed balanced expansion of 4 with the \kappa-adic version of the repeating part (Another direct manipulation)
Increment the least significant digit in the expansion of 2 twice (Addition)
4 = 2 + 2 = \frac{\kappa^2}{1 + \kappa} + 2 = \dots\bar{1}1\bar{1}102_{\kappa}
Add the expansion of 2 to itself (Multiplication)
4 = 2 \cdot 2 = 2 \cdot \frac{\kappa^2}{1 + \kappa} = \dots\bar{2}2\bar{2}200_{\kappa}
Square the power series expansion of 2 (Exponentiation)
\begin{gather*}
4 = 2^2 = \left(\frac{\kappa^2}{1 + \kappa}\right)^2 =
-\kappa^4 \left(
\frac{d}{dx} \frac{1}{1 + x}
\right)_{x = \kappa}
= \dots\bar{4}3\bar{2}10000_{\kappa}
\end{gather*}
If all of these series are expansions of four, then they should produce the same string after applying the carry enough times. Fortunately, this seems to be the case, as this table demonstrates:
The rightmost series is the most resilient to the carry head growth, but it comes at the cost of not operating on a repeating series. In the range shown, all three columns converge to the same digit sequence, which truncated to 20 terms is:
Contrary to the sequence used to build it, this expansion appears to be nonrepeating. As of writing, there are no matches in the OEIS, even if the leading 0’s are ignored. The Haskell used to generate each expansion above can be found here, and the first 8192 digits be found in a CSV here.
All Positive
If we are slightly greedier with the carry, we can clear it of all negative digits. For example,
Again, it appears to be possible to achieve this sequence by applying the carry enough times, starting with any of the alternative expansions. A similar CSV containing 8192 terms is available here.
This alternate expansion is somewhat confounding, since κ is bounded above by the integer three and should therefore require three symbols in its alphabet. I can think of two explanations, and do not know whether either of them are correct:
The expansion is related to the conjugate root \kappa^* = 1 -\ \sqrt 3 \approx -0.73205\dots. The reciprocal of this number is less than two.
Because infinite precision is required, the minimal alphabet can become (possibly arbitrarily) small.
Searching for Repetition
The discrete Fourier transform is an operation on a discrete signal (i.e., a sequence of numbers). It has the desirable property that it converts highly repetitive signals sequences into ones with peaks. We can use this to assess whether an expansion repeats or not.
Since our expansions are infinite, we’ll need to truncate them. Unfortunately, this renders us unable to pick up on repetitions larger than a certain size. In other words, to detect very large periods, we need to truncate our sequence to a large number of terms.
For example, the digits in the decimal expansion of 1/7 form the string “142857”, repeating. Truncating this sequence to 256 terms, we can plot its DFT:
Code
from itertools import cycle, islicefrom matplotlib import pyplot as pltimport numpy as npone_seventh =list(islice(cycle([1,4,2,8,5,7]), 256))plt.title("DFT of first 256 digits of decimal expansion of 1/7")plt.plot(abs(np.fft.fft(one_seventh))[:129])
The clear peak near forty is because the expansion repeats every 6 terms and \frac{256}{43} < 6 < \frac{256}{42}.
Four-ier Transforms
If the \kappa-adic expansion of four is nonrepeating, then its DFT should not have any noticeable peaks.
Code
import csvwithopen("cendree_adic_4.csv") as f: cendree_adic_4 = [int(i) for i inlist(csv.reader(f))[0]]plt.title("DFT of first 256 digits of $\\kappa$-adic expansion of 4")plt.plot(abs(np.fft.fft(cendree_adic_4[:256]))[:129])
The DFT of the first 256 terms shows it to be very noisy. There is a pronounced spike at the right edge of the graph (the Nyquist frequency), but it has a simple explanation: 1 appears only at even place values and \bar{1} at odd. At Nyquist, the DFT degenerates into an alternating sum, so its value is simply the number of nonzero digits.
If we map the negatives out of the sequence, the peak moves to the left edge (where the DFT degenerates into a sum).
Code
plt.title("DFT of $4_{\\kappa}$ after mapping $\\bar{1}$ to $1$")plt.plot(abs(np.fft.fft([abs(i) for i in cendree_adic_4[:256]]))[:129])
If you look closely, you can notice that this plot is a mirror of the other.
Longer Truncations
Even in the 8192-term truncation, there are no noticeable spikes in its DFT, lending further credence to its aperiodicity. If it feels like we’re doing something wrong, we might also try the “all-positive” variant of the expansion. Unfortunately, we’re not so lucky. Even then, we just end up with pure noise.
Code
plt.title("DFT of first 8192 digits of $4_{\\kappa}$")plt.plot(abs(np.fft.fft(cendree_adic_4))[:len(cendree_adic_4) //2])## Alternatively, with the non-balanced expansionwithopen("cendree_adic_4_binary.csv") as f: cendree_adic_4_binary = [int(i) for i inlist(csv.reader(f))[0]]plt.title("DFT of first 8192 digits of $4_\\kappa$ (binary)")plt.plot(abs(np.fft.fft(cendree_adic_4_binary))[1:len(cendree_adic_4_binary) //2])
Much like the expansion of irrational numbers in integral bases, the balanced κ-adic expansion of four seems to be nonrepeating. This is surprising, considering four is an integer, and especially since its expansion terminates in a normal alphabet and repeats in a balaced alphabet.
Closing
This concludes the discussion of base κ and the κ-adics. Remember, we only bothered investigating κ-adic expansions for the number four. Greater integers suffer the same issues, and other bases are certainly possible. Hopefully, four provides an illuminating enough example of the general chaos induced by irrational bases.
The next post will return to integral sequences, and the patterns produced from their “erroneousness” as an actual base.
Footnotes
Proof sketch that base κ expansions of integers above three end in “2”
Recall that 3 = 10.02_{\kappa} and 4 = 11.02_{\kappa}.
We can add two expansions together to produce a new valid expansion. Hence,
From these examples, we see that adding small numbers like three will, at most, produce a “3” or “4” in the negative second place value.
If there is a “2” in the negative first place value, then expanding “3” or “4” in the negative second will give a “3” there, which is troublesome. But we got in this position by adding three; by adding two first, we can apply the carry across the zeroth and negative first place values instead, which produces at most a “3” in the first place value. Expanding “3” at this place value places a “2” back in the negative first place value, and we don’t have to worry about modifying digits in other negative place values.
If there is not a “2” in the negative first place value, then expanding the “3” or “4” in the negative second place value pushes a “2” into the negative fourth place value. From here “2” is either in the terminal position, or causes another expansion of “3” or “4”. In the latter cases, we recurse, eventually pushing a “2” into a negative even place value in terminal position.
↩︎