12 lines
32 KiB
JSON
12 lines
32 KiB
JSON
{
|
||
"hash": "db9082462bd0496a6f94d531a02b794b",
|
||
"result": {
|
||
"engine": "jupyter",
|
||
"markdown": "---\ntitle: \"Polynomial Counting 3: The third degree\"\ndescription: |\n Interesting results on simple irrational counting systems involving only zero and one.\nformat:\n html:\n html-math-method: katex\ndate: \"2021-02-06\"\ndate-modified: \"2025-02-08\"\njupyter: python3\ncategories:\n - algebra\n - phinary\n - binary\n - python\ncode-fold: true\n---\n\n<style>\n .cell-output-display .figure {\n text-align: center;\n }\n\n /* #long-trunc-figures .figure-img { */\n .figure-img {\n max-width: 512px;\n object-fit: contain;\n height: 100%;\n }\n</style>\n\n\n\nThis post assumes you have read the [first](../1) post, which introduces generalized positional counting,\n and the [second](../2), which restricts the focus and specifies the general aim.\n\nThus far, the systems have been based on quadratic polynomials and two-term linear recurrences,\n or more directly, carries of width two.\nNumbers larger than one introduce certain complications to carries.\nWith that in mind, let's go back to things closer to phinary and Fibonacci.\n\n\nTribonacci and Beyond\n---------------------\n\nThe *Tribonacci numbers* ([OEIS A000073](http://oeis.org/A000073)) come from elongating the\n Fibonacci recurrence to 3 terms.\nIn other words, this is the carry/recurrence $\\langle 1,1,1|$.\nThe Tribonacci numbers are seeded with two zeros followed by a single one;\n thus, the sequence begins $0, 0, 1, 1, 2, 4, 7, 13,\\dots$\nThe *Tribonacci constant* is the limiting ratio of these numbers\n (i.e., the positive real root of $x^3 - x^2 - x - 1$) with approximate value $T = 1.8393\\dots$\n\nThe number two bounds both this number and the terms in the recurrence, so its expansion can be deduced:\n\n$$\n\\textcolor{red}{2} = 1.\\textcolor{red}{111}_T = \\textcolor{blue}{1.11}1_T = \\textcolor{blue}{1}0.001_T\n$$\n\nNaturally, the string \"111\" will be illegal in both systems.\nThe Tribonacci expansions of the integers are as follows:\n\n:::: {.row .text-center width=\"60%\"}\n::: {#canonical-tribonacci-table .column}\n\n| *n* (Decimal) | *n* (base $T$) | *n* (Tribonacci) |\n|--------------:|:--------------:|------------------|\n| 0 | 0 | 0 |\n| 1 | 1 | 1 |\n| 2 | 10.001 | 10 |\n| 3 | 11.001 | 11 |\n| 4 | 100.100011 | 100 |\n| 5 | 101.100011 | 101 |\n| 6 | 110.101011 | 110 |\n| 7 | 1000.101011 | 1000 |\n| 8 | 1001.101011 | 1001 |\n| 9 | 1010.110100011 | 1010 |\n| 10 | 1100.010100011 | 1011 |\n\n:::\n::::\n\nSince \"111\" is a rarer string than \"11\", the integral base more closely resembles standard binary.\n\nExtensions of the Fibonacci numbers, which have an $n$-term recurrence\n (seeded with $n - 1$ zeroes followed by a one) are called \"n-nacci\" or \"n-bonacci\" numbers.\nIf we discard the seeding terms, then for larger and larger *n*, this sequence of sequences appears\n to approach the powers of two.\n\n$$\n\\begin{matrix}\n \\text{Fibonacci: } & & & 0,& 1,& 1,& 2,& 3,& 5,& 8\\dots \\\\\n \\text{Tribonacci: } & & 0,& 0,& 1,& 1,& 2,& 4,& 7,& 13\\dots \\\\\n \\text{Tetranacci: } & 0,& 0,& 0,& 1,& 1,& 2,& 4,& 8,& 15\\dots \\\\\n \\vdots \\\\\n \\text{Binary: } & (\\dots,& 0,& 0,& 1,)& 1,& 2,& 4,& 8,& 16\\dots\n\\end{matrix}\n$$\n\nIn the limit, the rightmost and leftmost \"1\"s in the carry $\\langle 1, 1, ..., 1, 1 |$ are\n infinitely far away from each other.\nThis is similar to binary, in which $2 = 1.1111\\dots_2$.\nThis argument is clearer if we directly manipulate the carry as a polynomial $p_n(x)$:\n\n$$\n\\begin{align*}\np_n &= x^n - x^{n-1} - … - x - 1 \\\\\n-p_n &= -x^n + x^{n-1} + … + x + 1 \\\\\nx^n - p_n &= x^{n-1} + … + x + 1 \\\\\nx - p_n x^{-n+1} &= 1 + x^{-1} + … x^{-n+2} + x^{-n+1} \\\\[8pt]\n\\text{Let } n &\\rightarrow \\infty \\\\\nx &= 1 + x^{-1} + x^{-2} + x^{-3} + …\n\\end{align*}\n$$\n\nSince both *φ* and $T$ are greater than 1, we can assume that $x > 1$, which causes the\n $x^{-n+1}$ term to vanish in the limit.\nUnfortunately, this means $p_n$ should diverge, invalidating the above argument.\n\nIgnoring this, the last line can be manipulated as a power series:\n\n$$\n\\begin{align*}\n\\frac{1}{1 - x} &= 1 + x + x^2 + x^3 + \\dots \\\\\n\\frac{1}{1 - (1/x)} &= 1 + x^{-1} + x^{-2} + x^{-3} + \\dots \\\\\nx &= \\frac{1}{1- (1/x)} \\\\\nx - 1 &= 1 \\\\\nx &= 2\n\\end{align*}\n$$\n\nWhich is to imply that, in a non-rigorous sense and by partially assuming the conclusion,\n that the $n$-nacci constants approach two.\n\n\nGolder than Gold\n----------------\n\nAll carries entirely made up of \"1\"s correspond to the $n$-nacci constants.\nWhile this would appear to exhaust every sequence without going to negative numbers,\n it ignores the potential of carries with a \"0\".\n\nStarting simple, Narayana's cows sequence ([OEIS A000930](http://oeis.org/A000930)) corresponds to\n the recurrence $\\langle 1,0,1|$.\nIt may be seeded with either three 1's, or in the same way as above, with a sequence of 0's followed by a 1.\nThe limiting ratio $\\psi \\approx 1.4656\\dots$ is called the supergolden ratio.\nThe introduction of \"0\"s turns out to have big implications, since the concatenation trick to devise\n the expansion of two no longer works.\nHowever, hope is not lost.\n\n$$\n\\begin{gather*}\n 1\\textcolor{red}{1}000_\\psi\n = 10\\textcolor{red}{101}_\\psi\n = \\textcolor{blue}{101}01_\\psi\n = \\textcolor{blue}{1}00001_\\psi \\\\\n \\textcolor{red}{2} = 1.\\textcolor{red}{101}_\\psi\n = \\textcolor{blue}{1.1}01_\\psi\n = \\textcolor{blue}{1}0.001\\textcolor{blue}{1}_\\psi\n = 10.00\\textcolor{purple}{11}_\\psi\n = 10.0\\textcolor{purple}{1}0000\\textcolor{purple}{1}_\\psi\n\\end{gather*}\n$$\n\nIncredibly, the carry contains not only an explicit rule for \"101\", but implicit rules \"2\" and \"11\".\nThis sort of makes sense: since $\\psi < \\varphi$, adjacent place values are \"too dense\",\n and therefore we can rewrite the string \"11\".\nOn the other hand, attempting to manipulate \"1001\" and \"10001\" results in circuiting back to the original string.\n\n$$\n\\begin{split}\n 100\\textcolor{red}{1}000000_\\psi\n &= 1000\\textcolor{red}{101}000_\\psi\n = 1000\\textcolor{orange}{1}01000_\\psi\n = 10000\\textcolor{orange}{1}1\\textcolor{orange}{1}00_\\psi \\\\\n &= 10000\\textcolor{blue}{11}100_\\psi\n = 1000\\textcolor{blue}{1}0010\\textcolor{blue}{1}_\\psi\n = 1000100\\textcolor{red}{101}_\\psi \\\\\n &= 100010\\textcolor{red}{1}000_\\psi\n = 1000\\textcolor{orange}{101}000_\\psi\n = 100\\textcolor{orange}1000000_\\psi \\\\ \\\\\n \\textcolor{red}{1}0001000_\\psi\n &= 0\\textcolor{red}{101}1000_\\psi\n = 010\\textcolor{blue}{11}000_\\psi\n = 01\\textcolor{blue}{1}0000\\textcolor{blue}{1}_\\psi \\\\\n &= 0\\textcolor{purple}{11}00001_\\psi\n = \\textcolor{purple}{1}0000\\textcolor{purple}{1}01_\\psi \\\\\n &= 10000\\textcolor{red}{101}_\\psi = 1000\\textcolor{red}{1}000_\\psi\n\\end{split}\n$$\n\nI call these strings of \"0\"s sandwiched between \"1\"s *spacings*.\nThe smallest spacing, with a width of zero, is the Fibonacci recurrence.\nIf we forbid both the width-1 and width-0 spacings from appearing in supergolden expansions,\n we obtain the following list:\n\n:::: {.row .text-center width=\"60%\"}\n::: {#canonical-supergolden-table .column}\n\n<style>\n#canonical-supergolden-table td > em\n{\n color: red !important;\n font-style: normal !important;\n}\n</style>\n\n| *n* (Decimal) | *n* (base $\\psi$) |\n|--------------:|:-------------------:|\n| 0 | 0 |\n| 1 | 1 |\n| 2 | 10.0100001 |\n| 3 | *100.0110001* |\n| 3 | 100.1000100001 |\n| *4* | *110.0001100001* |\n| 4 | 1000.1000100001 |\n| *5* | *1010.0001100001* |\n| 5 | 10000.0010001 |\n| 6 | 10001.0010001 |\n| *7* | *10010.0110002* |\n| *7* | *10010.1000012* |\n| 7 | 100000.0001000001 |\n| 8 | 100001.0001000001 |\n| 9 | 100100.0000001001 |\n| 10 | 1000000.0000001001 |\n\n:::\n::::\n\nIn the above table, some intermediate steps are shown in red,\n but the last entry for each integer is canonical.\nNot only does the number of digits grow radically faster than in phinary (or even binary),\n but there are many more intermediate steps.\n\nFor space reasons, I do not show the integral dual.\nSlowly-growing sequences, which have largely uninteresting integral systems, dominate the rest of this post.\nTherefore, the remainder of this post will focus solely on fractional systems.\n\n\nRadiant Plastic\n---------------\n\nA similar degree 3 recurrence is $\\langle 0,1,1|$.\nIts root corresponds to the plastic ratio $\\rho \\approx 1.3247\\dots$.\nA number of sequences share this recurrence; when seeded with $0, 0, 1$ as before,\n the best match is the Padovan sequence ([OEIS A000931](http://oeis.org/A000931)),\n which begins with an additional one.\n\nSince $\\rho < \\psi < \\varphi$, we should expect that spacings of at least width two are illegal.\nThe system turns out to be even stricter than that: spacings up to and including width three are expandable.\n\n$$\n\\begin{array}{c|c}\n \\text{Width} & \\textcolor{red}{0} & \\textcolor{green}{1} & 2 & \\textcolor{blue}{3} \\\\ \\hline\n & 0\\textcolor{red}{011}_\\rho\n & 010\\textcolor{red}{1}000_\\rho\n & 0\\textcolor{red}{1}00\\textcolor{red}{1}00000_\\rho\n & 0\\textcolor{red}{1}0001_\\rho\n \\\\\n & \\textcolor{red}{1}000_\\rho\n & 0100\\textcolor{red}{011}_\\rho\n & 00\\textcolor{red}{011}\\textcolor{red}{011}00_\\rho\n & 00\\textcolor{red}{011}1_\\rho\n \\\\\n && 0\\textcolor{blue}{10001}1_\\rho\n & 000\\textcolor{blue}{11011}00_\\rho\n & 000\\textcolor{orange}{111}_\\rho\n \\\\\n && \\textcolor{blue}{1}000001_\\rho\n & 00\\textcolor{blue}{1}0101000_\\rho\n & 00\\textcolor{orange}{1}100_\\rho\n \\\\\n &&\n & 0010\\textcolor{green}{101}000_\\rho\n & 0\\textcolor{red}{011}00_\\rho\n \\\\\n &&\n & 001\\textcolor{green}{1000001}_\\rho\n & \\textcolor{red}{1}00000_\\rho\n \\\\\n &&\n & 0\\textcolor{red}{011}000001_\\rho\n \\\\\n &&\n & \\textcolor{red}{1}000000001_\\rho\n \\\\\\\\\n \\hline\n & s_0 = \\rho^2\n & s_1 = \\rho s_{5}\n & s_2 = \\rho s_{8}\n & s_3 = \\rho\n\\end{array}\n$$\n\nThe final line is shorthand for the spacing rules:\n\n- The zero-spacing is equal to a one in the place value two higher than it\n- The one-spacing is equal to an five-spacing which begins one place value higher than it\n- The two-spacing is equal to an eight-spacing which begins one place value higher than it\n- The three-spacing is equal to a one in the place value one higher than it\n\nWith these rules, we can write a canonical expansion expansion for 2:\n\n$$\n\\begin{align*}\n \\textcolor{red}{2}\n &= 1.\\textcolor{red}{011}\n = \\textcolor{blue}{1.011}\n = \\textcolor{blue}{1}\\overbrace{0.0100000}^{8 \\text{ digits}}\\textcolor{blue}{1} \\\\\n &= \\textcolor{purple}{10.01}000001\n = \\textcolor{purple}{1}00.000000\\textcolor{purple}{1}1 \\\\\n &= 100.00000\\textcolor{red}{011}\n = 100.0000\\textcolor{red}{1}\n\\end{align*}\n$$\n\nSince $\\rho < \\sqrt 2$, the largest place value in the expansion of two is $\\rho^2$, which\n distinguishes it from previous systems.\n\nSimilarly to how the width-two and width-three spacings are allowed in the supergolden ratio base,\n we realize that the width-four spacing cannot be expanded further in the plastic ratio base:\n\n$$\n\\begin{align*}\n \\textcolor{red}{1}0000\\textcolor{red}{1}000\n &= 0\\textcolor{red}{011}00\\textcolor{red}{011}\n = 001\\textcolor{blue}{10001}1\n = 00\\textcolor{blue}{2}000001 \\\\\n &= \\textcolor{blue}{1}000000\\textcolor{blue}{1}1\n = 100001000\n\\end{align*}\n$$\n\nWith these implicit rules derived for spacings of width smaller than three,\n the plastic expansions of the integers up to ten are as follows:\n\n:::: {.row .text-center width=\"70%\"}\n::: {#canonical-plastic-table .column}\n\n<style>\n#canonical-plastic-table td > em\n{\n color: red !important;\n font-style: normal !important;\n}\n</style>\n\n| *n* (Decimal) | *n* (base $\\rho$) |\n|--------------:|:----------------------------:|\n| 0 | 0 |\n| 1 | 1 |\n| 2 | 100.00001 |\n| *3* | *101.00001* |\n| *3* | *1000.00101* |\n| 3 | 1000.01000001 |\n| *4* | *10000.0101000000001* |\n| 4 | 10000.1000001000001 |\n| *5* | *10100.0000001000001* |\n| 5 | 100000.1000001000001 |\n| *6* | *100001.1000001000001* |\n| *6* | *100100.0000001000001* |\n| *6* | *1000000.0010001000001* |\n| 6 | 1000000.0100000000001 |\n| *7* | 1000001.0100000000001 |\n| 7 | 1000010.0000100000001 |\n| *8* | *1001000.0000100000001* |\n| *8* | *10000000.0100100000001* |\n| *8* | *10000000.1000000001001* |\n| 8 | 10000000.100000001000000001 |\n| 9 | 10000100.000000001000000001 |\n| 10 | 10001000.001000001000000001 |\n\n:::\n::::\n\nClearly, this base is incredibly sensitive.\nA number as small as 8 has a fractional part as small as $\\rho^{-18}$ in its expansion.\n\n\nSkipped Spacings\n----------------\n\nWhen discussing the expandable spacings in the supergolden and plastic bases, they jumped from\n width one to width three.\nDid we forgot width 2?\nThe strings \"1001\" and \"10001\" are associated to the carries\n $\\langle 1, 0, 0, 1|$ and $\\langle 1, 0, 0, 0, 1|$.\n\n| Spacing Width | Carry | Integral Sequence | Root |\n|---------------|--------------------------------------------|------------------------------------------|---------------------------|\n| 0 | $\\langle 1,1|$ | Fibonacci numbers, Lucas numbers | Golden Ratio, $\\varphi$ |\n| 1 | $\\langle 1,0,1|$ | Narayana's cows sequence | Supergolden Ratio, $\\psi$ |\n| 2 | $\\langle 1,0,0,1|$ | [OEIS A003269](https://oeis.org/A003269) | Unnamed $(\\upsilon?)$ |\n| 3 | $\\langle 1,0,0,0,1| \\simeq \\langle 0,1,1|$ | Padovan sequence, Perrin sequence | Plastic Ratio, $\\rho$ |\n\nI chose the symbol $\\upsilon$ since it came from the second half of the Greek alphabet,\n like the others.\n\nWhile the width-two spacing is a irreducible polynomial like its predecessors,\n the width-three one can be factored\n\n::: {#1d27f169 .cell execution_count=2}\n``` {.python .cell-code}\ndef spacing(width):\n return x**(width + 2) - x**(width + 1) - 1\n\nsympy.Eq(spacing(3), spacing(3).factor())\n```\n\n::: {.cell-output .cell-output-display .cell-output-markdown execution_count=2}\n$\\displaystyle x^{5} - x^{4} - 1 = \\left(x^{2} - x + 1\\right) \\left(x^{3} - x - 1\\right)$\n:::\n:::\n\n\nThis also means that despite $\\rho$ and $\\psi$ being cubic roots,\n $\\upsilon$ is irreducibly a quartic root, despite being between them in terms of spacing width.\n\nThe right polynomial may be familiar from the previous post as $\\langle 1, -1 |$,\n which only has complex roots.\nIt happens to be the sixth cyclotomic polynomial ($\\Phi_6$), and allows the width-three spacing\n to be equivalent to the simpler plastic ratio carry.\n\nAs previously stated, the cyclotomic polynomials cause big trouble for carries.\nOther than factoring, there appears to be no way to derive $\\langle 0,1,1|$ from $\\langle 1,0,0,0,1|$.\nAt best, we can observe the following:\n\n$$\n\\begin{matrix}\n \\langle 1,0,0,0,1| && \\langle 0,1,1| \\\\ \\hline\n 11111 &\\iff& 11111 \\\\\n 101110 && 1000111 \\\\\n 1001100 &\\iff& 1001100 \\\\\n 10001000 && 1100000 \\\\\n 100000000 &\\iff& 100000000 \\\\\n\\end{matrix}\n$$\n\n\n### Chopped Circles\n\nThe appearance of a cyclotomic factor is not unique to the width-three spacing.\nEach of the smaller-width rules in the supergolden and plastic bases can be reexamined as polynomials.\nAfter converting and factoring, their cyclotomic factors become clear:\n\n$$\n\\begin{gather*}\n 11000_\\psi = 100001_\\psi \\\\\n 1\\bar{1}\\bar{1}001_\\psi = 0 \\\\\n \\psi^5 - \\psi^4 - \\psi^3 + 1 \\\\\n (\\psi - 1)(\\psi + 1)(\\psi^3 - \\psi^2 - 1) \\\\\n \\Phi_1 \\Phi_2 \\langle 1,0,1|\n \\\\ \\\\\n \\begin{gather*}\n 101000_\\rho = 1000001_\\rho &\n 100100000_\\rho = 1000000001_\\rho \\\\\n 1\\bar{1}0\\bar{1}001_\\rho = 0 &\n 1\\bar{1}00\\bar{1}00001_\\rho = 0 \\\\\n \\rho^6 - \\rho^5 - \\rho^3 + 1 &\n \\rho^9 - \\rho^8 - \\rho^5 + 1 \\\\\n (\\rho - 1)(\\rho^2 + 1)(\\rho^3 - \\rho - 1) &\n \\dots(\\rho^2 - \\rho + 1)(\\rho^3 - \\rho - 1) \\\\\n \\Phi_1 \\Phi_4 \\langle 0,1,1| &\n \\Phi_1 \\Phi_2 \\Phi_4 \\Phi_6 \\langle 0,1,1|\n \\end{gather*}\n\\end{gather*}\n$$\n\nThough I am uncertain without a proof, it seems that cyclotomic polynomials\n play a role in spacing out \"1\"s.\nThis is to say that spacings have a \"fundamental\" irreducible polynomial.\nBy multiplying certain cyclotomic polynomials by the fundamental, (all?) smaller spacings\n can produce spacings the size of the fundamental or less.\n\nNaturally, I attempted to write a program to compute lesser spacings from an implicit rule.\nGenerally, this entailed assembling all lesser spacings, then expanding the rightmost 1\n if unable to find any spacing, else replacing and continuing.\nUnfortunately, since it operates in lockstep, it gets stuck easily, and I had little success.\nMy Haskell code can be found [here](zero_spacing.hs).\n\n### Inherently Factorable Spacings\n\nThe width-three spacing is not fundamental, since it can be factored.\nWe can collect reducible spacings into a table:\n\n::: {#ad77d9de .cell execution_count=3}\n\n::: {.cell-output .cell-output-display .cell-output-markdown execution_count=3}\n------------ ------------------------------------- ------------------------------------- ------------------------------------- ---------------------------------- ------------------------------------- ------------------------------------- ------------------------------------- ------------------------------------- ------------------------------------- ---------------------------------- ------------------------------------- ------------------------------------- ------------------------------------- ------------------------------------- ------------------------------------- ---------------------------------- ------------------------------------- ------------------------------------- ------------------------------------- -------------------------------------\n*n*-spacing 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19\nIrreducible? <span style='color: green'>Yes</span> <span style='color: green'>Yes</span> <span style='color: green'>Yes</span> <span style='color: red'>No</span> <span style='color: green'>Yes</span> <span style='color: green'>Yes</span> <span style='color: green'>Yes</span> <span style='color: green'>Yes</span> <span style='color: green'>Yes</span> <span style='color: red'>No</span> <span style='color: green'>Yes</span> <span style='color: green'>Yes</span> <span style='color: green'>Yes</span> <span style='color: green'>Yes</span> <span style='color: green'>Yes</span> <span style='color: red'>No</span> <span style='color: green'>Yes</span> <span style='color: green'>Yes</span> <span style='color: green'>Yes</span> <span style='color: green'>Yes</span>\n------------ ------------------------------------- ------------------------------------- ------------------------------------- ---------------------------------- ------------------------------------- ------------------------------------- ------------------------------------- ------------------------------------- ------------------------------------- ---------------------------------- ------------------------------------- ------------------------------------- ------------------------------------- ------------------------------------- ------------------------------------- ---------------------------------- ------------------------------------- ------------------------------------- ------------------------------------- -------------------------------------\n:::\n:::\n\n\nIn the range given, this table appears to repeat every six terms.\nWe can examine each of these factors directly:\n\n$$\n\\begin{align*}\n x^5 - x^4 - 1 &= (x^2 - x + 1)\n (x^3 - x - 1) \\\\\n &= 1\\bar{1}1_x * 10\\bar{1}\\bar{1}_x \\\\\n x^{11} - x^{10} - 1 &= (x^2 - x + 1)\n (x^9 - x^7 - x^6 + x^4 + x^3 - x - 1) \\\\\n &= 1\\bar{1}1_x * 10\\bar{1}\\bar{1}0110\\bar{1}\\bar{1}_x \\\\\n x^{17} - x^{16} - 1 &= (x^2 - x + 1)\n (x^{15} - x^{13} - \\dots + x^4 + x^3 - x - 1) \\\\\n &= 1\\bar{1}1_x * 10\\bar{1}\\bar{1}0110\\bar{1}\\bar{1}0110\\bar{1}\\bar{1}_x \\\\\n 5, 11, 17, \\dots &= 6n + 5\n\\end{align*}\n$$\n\nEach of these polynomials has $\\Phi_6$ as a common factor.\nThe other factor appears to be a truncation of the repeating string \"$\\underline{0110\\bar{1}\\bar{1}}$\".\n^[Since I already use the overbar for negative digits, I gather repeating terms using an underline as a vinculum.]\nInterpreted as a power series, this is the reciprocal of $-\\Phi_6$ ([OEIS A010892](https://oeis.org/A010892)).\n\nAs the carry approaches infinite width, the $x$ terms go to 0 for $x < 1$.\nThis shows that like the $n$-nacci constants approach two, the spacing constants approach one.\n\n\nRepeating Expansions\n--------------------\n\nLet's not get too eager here and instead return to base $\\upsilon$.\nIt should be possible to expand the strings \"11\" and \"101\", since it is the fundamental spacing of width 2.\nHowever, we immediately run into an issue:\n\n$$\n\\begin{array}{c|c}\n \\text{Width} & \\textcolor{green}{0} & \\textcolor{blue}{1} & \\textcolor{red}{2} \\\\ \\hline\n & 01\\textcolor{red}{1}00000_\\upsilon\n & 010\\textcolor{red}{1}0000_\\upsilon\n & 0\\textcolor{red}{1001}_\\upsilon\n \\\\\n & 010\\textcolor{red}{1001}0_\\upsilon\n & 0100\\textcolor{red}{1001}_\\upsilon\n & \\textcolor{red}{1}0000_\\upsilon\n \\\\\n & 0\\textcolor{blue}{101}0010_\\upsilon\n & 0\\textcolor{orange}{1001}001_\\upsilon\n \\\\\n & \\textcolor{blue}{1}000001\\textcolor{blue}{1}_\\upsilon\n & \\textcolor{orange}{1}0000001_\\upsilon\n \\\\\n & 100000\\textcolor{green}{11}_\\upsilon \\\\\n & \\vdots \\\\ \\hline\n & s_0 = \\ ? & s_1 = \\rho s_6 & s_2 = \\rho\n\\end{array}\n$$\n\nThe width-0 expansion is recursive.\nIf we continue to apply its rule, we generate the string \"100001\" repeating.\nFortunately, each repeating unit is a width-four spacing, which is allowed by the carry.\n\nRepeating expansions imply a representation by geometric series:\n\n$$\n\\begin{gather*}\n 1.\\underbrace{\\underline{0\\dots1}}_{n}{}_x = 1 + x^{-n} + x^{-2n} + x^{-3n} + \\dots\n = \\frac{1}{1 - (1/x)^n} = \\frac{x^n}{x^n - 1}\n \\\\\n 10 = 1.\\underbrace{\\underline{0\\dots1}}_{n}{}_x ~\\iff~ x = \\frac{x^n}{x^n - 1} \\\\\n 1 = \\frac{x^{n-1}}{x^n - 1} \\\\ \\\\\n x^{n-1} = x^n - 1\n\\end{gather*}\n$$\n\nThe final expression is just the definition of a carry, so we can immediately write:\n\n$$\n\\begin{align*}\n 10_\\varphi &= 1.\\underline{01}_\\varphi & &\n \\text{Carry } \\langle 1,1| \\\\\n 10_\\psi &= 1.\\underline{001}_\\psi & &\n \\text{Carry } \\langle 1,0,1| \\\\\n 10_\\upsilon &= 1.\\underline{0001}_\\upsilon & &\n \\text{Carry } \\langle 1,0,0,1| \\\\\n 10_{\\rho} &= 1.\\underline{00001}_\\rho & &\n \\text{Carry } \\langle 1,0,0,0,1| = \\langle 0,1,1|\n\\end{align*}\n$$\n\nThis neatly ties repeating spacings in with carries.\n^[Recall that when we naively computed ten in base *φ*, we got \"10100.0100101010101010101\".\nAfter a certain point, this expansion alternates between 0 and 1. Assuming that this is true repetition\nand applying $10_\\varphi = 1.\\underline{01}_\\varphi$, one obtains \"10100.0101\", which is canonical. ]\n\nBut we didn't want \"10\" as a repeating expansion, we wanted \"11\".\nAttempting to justify with the same strategy:\n\n$$\n\\begin{align*}\n 0.11_\\upsilon &= 1.\\underline{00001}_\\upsilon & \\text{Carry } \\langle 1,0,0,1|\n \\\\\n \\frac{1}{x} + \\frac{1}{x^2} &= \\frac{x^n}{x^n - 1} \\\\\n x + 1 &= \\frac{x^{n+2}}{x^n - 1}\n \\\\[8pt]\n x^{n+1} + x^n - x - 1 &= x^{n+2} \\\\\n x^{n+2} - x^{n+1} - x^n + x + 1 &= 0 \\\\\n x^n(x^2 - x - 1) + x + 1 &= 0\n\\end{align*}\n$$\n\n::: {#cb467d1a .cell execution_count=4}\n``` {.python .cell-code}\nrepeating_pair = lambda n: (x**n * (x**2 - x - 1) + x + 1).expand().factor()\n\nMarkdown(tabulate(\n zip(*(\n [[\"*n*-repeat\", \"Irreducible?\"]]\n + [[ str(i), display(is_irreducible(repeating_pair(i))) ] for i in range(1, 10)]\n ))\n))\n```\n\n::: {.cell-output .cell-output-display .cell-output-markdown execution_count=4}\n------------ ------------------------------------- ------------------------------------- ------------------------------------- ------------------------------------- ---------------------------------- ------------------------------------- ------------------------------------- ------------------------------------- -------------------------------------\n*n*-repeat 1 2 3 4 5 6 7 8 9\nIrreducible? <span style='color: green'>Yes</span> <span style='color: green'>Yes</span> <span style='color: green'>Yes</span> <span style='color: green'>Yes</span> <span style='color: red'>No</span> <span style='color: green'>Yes</span> <span style='color: green'>Yes</span> <span style='color: green'>Yes</span> <span style='color: green'>Yes</span>\n------------ ------------------------------------- ------------------------------------- ------------------------------------- ------------------------------------- ---------------------------------- ------------------------------------- ------------------------------------- ------------------------------------- -------------------------------------\n:::\n:::\n\n\nFor $n = 5$, the polynomial factors as the product of $\\langle 1, 0, 0, 1|$ and $\\langle 0, 1, 1|$.\nThe second factor should come as no surprise since we know directly that $0.11_\\rho = 10_\\rho$\n and we already evaluated $10_{\\rho} = 1.\\underline{00001}_\\rho$\n\nChecking more $n$, this polynomial actually seems to be the only reducible one for quite a while.\n\n::: {#841d895c .cell freeze='true' execution_count=5}\n``` {.python .cell-code code-fold=\"false\"}\nall(is_irreducible(repeating_pair(i)) for i in range(10, 100))\n```\n\n::: {.cell-output .cell-output-display execution_count=5}\n```\nTrue\n```\n:::\n:::\n\n\nThis bestows some level of intrigue upon the repeating expansion of \"11\".\nSince repeating expansions are required for base $\\upsilon$ I will elect to not show the expansion of the integers.\n\n\n### Weird Modulus Patterns\n\nThis can be generalized slightly to match any spacing with any repeating spacing:\n\n$$\n\\begin{gather*}\n 0.\\underbrace{10\\dots01}_m = 1.\\underbrace{\\underline{0\\dots01}}_n\n ~\\Leftrightarrow~\n \\frac{1}{x} + \\frac{1}{x^m} = \\frac{x^n}{x^n - 1}\n \\\\\n x^{m-1} + 1 = \\frac{x^{n+m}}{x^n - 1} \\\\\n \\\\\n x^{n+m-1} + x^n - x^{m-1} - 1 = x^{n+m}\\\\\n x^{n+m} - x^{n+m-1} - x^n + x^{m-1} + 1 = 0 \\\\\n (x^n)(x^m - x^{m-1} - 1) + x^{m-1} + 1 = 0 \\\\\n\\end{gather*}\n$$\n\nIf the polynomial has factors, then fractional systems where those factors are carries have\n repeating expansions of width $n$ for a spacing of width $m$.\nGraphing the tuples of reducible polynomials produces a strange pattern\n apparently arranged in lines (going from the lower left to the upper right):\n\n::: {#2797b56d .cell execution_count=6}\n``` {.python .cell-code}\ngeneral_repeats = lambda m, n: (x**n)*(x**m - x**(m-1) - 1) + x**(m-1) + 1\n\nplt.xticks(range(20))\nplt.yticks(range(20))\nplt.xlabel(\"$m - 1$\")\nplt.ylabel(\"$n - 1$\")\nplt.imshow([\n [ is_irreducible(general_repeats(m + 1, n + 1)) for m in range(20) ]\n for n in range(20)\n])\n```\n\n::: {.cell-output .cell-output-display}\n{width=433 height=429}\n:::\n:::\n\n\nThe leftmost purple square is the exception, which corresponds to the earlier $(m, n) = (2, 5)$.\nEvery purple square here is a reducible polynomial, the first few of whose factors are:\n\n\n| $(m, n)$ | Sum | Polynomial Factors\n|----------|-----|-------------------\n| (2, 5) | 7 | $(x^3 - x - 1) (x^4 - x^3 - 1)$\n| (3, 11) | 14 | $(x^4 - x^3 + x^2 - x + 1)$ <br> $(x^{10} - x^8 - x^7 - x^6 - x^5 + x^3 + x^2 + x + 1)$\n| (7, 7) | | $(x^4 - x^3 + x^2 - x + 1)$ <br> $(x^{10} - x^8 - x^5 + x + 1)$\n| (13, 1) | | $(x^4 - x^3 + x^2 - x + 1)$ <br> $(x^{10} + x^7 - x^5 - x^2 + 1)$\n| (7, 17) | 24 | $(x^4 - x^3 + x^2 - x + 1)$ <br> $(x^{20} - x^{18} - x^{15} - x^{12} + x^{10} + x^7 - x^5 + x + 1)$\n| (13, 11) | | $(x^4 - x^3 + x^2 - x + 1)$ <br> $(x^{20} - x^{18} - x^{15} + x^{13} + x^{10} + \\dots + x + 1)$\n| (17, 7) | | $(x^4 - x^3 + x^2 - x + 1)$ <br> $(x^{20} - x^{18} - x^{15} + x^{13} + x^{12} + \\dots + x + 1)$\n| (17, 17) | | $(x^4 - x^3 + x^2 - x + 1)$ <br> $(x^{30} - x^{28} - x^{25} + x^{23} + x^{20} - x^{18} - \\dots + x + 1)$\n\nOnly the first entry has factor that is a carry associated to a spacing.\nEvery other entry appears to have $(x^4 - x^3 + x^2 - x + 1)$ as a common factor,\n which is the 10th cyclotomic polynomial.\n\nThese solutions also have sums which increment in tens, which correspond to the\n vertical and horizontal lines of purple squares in the image.\nBoth $m$ and $n$ solutions work in a similar way: the symmetric solution (7, 7)\n has similar solutions (7, 17), (17, 7), and (17, 17).\nThis pattern also holds up in the \"next\" terms (7, 27), (17, 27), (27, 27), (27, 17), and (27, 7).\nIt appears as though there is a congruence of $m + n\\ (\\text{mod } mn)$,\n where m and n come from the exception (2, 5).\nThis pattern is similar to the one in which one in every six spacings can be factored.\n\n\nClosing\n-------\n\nIn summary, the Fibonacci recurrence can be generalized in at least two two different ways.\nIntroducing \"0\"s into the carry is more touch-and-go than would otherwise seem,\n though they produce (with much effort) valid bases.\n\nThe [next post](../4) will explore a more distant cousin of the Fibonacci numbers,\n and other strange power series which arise from its discussion.\n\n",
|
||
"supporting": [
|
||
"index_files"
|
||
],
|
||
"filters": [],
|
||
"includes": {}
|
||
}
|
||
} |