{"id":6271,"date":"2023-01-03T16:04:20","date_gmt":"2023-01-03T14:04:20","guid":{"rendered":"https:\/\/blog.atlant.is\/?p=6271"},"modified":"2023-01-03T16:09:50","modified_gmt":"2023-01-03T14:09:50","slug":"janes-infinite-rosary","status":"publish","type":"post","link":"https:\/\/blog.douzeb.is\/?p=6271","title":{"rendered":"Jane&rsquo;s infinite rosary"},"content":{"rendered":"\n<figure class=\"wp-block-image aligncenter size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"422\" src=\"https:\/\/blog.atlant.is\/wp-content\/uploads\/2022\/12\/reluctant-jane-1024x422.png\" alt=\"\" class=\"wp-image-4340\" srcset=\"https:\/\/blog.douzeb.is\/wp-content\/uploads\/2022\/12\/reluctant-jane-1024x422.png 1024w, https:\/\/blog.douzeb.is\/wp-content\/uploads\/2022\/12\/reluctant-jane-300x124.png 300w, https:\/\/blog.douzeb.is\/wp-content\/uploads\/2022\/12\/reluctant-jane-768x317.png 768w, https:\/\/blog.douzeb.is\/wp-content\/uploads\/2022\/12\/reluctant-jane.png 1528w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>This mathematical treat was inspired by <a href=\"https:\/\/www.janestreet.com\/\" data-type=\"URL\" data-id=\"https:\/\/www.janestreet.com\/\">Jane Street<\/a>&lsquo;s puzzle: <a href=\"https:\/\/www.janestreet.com\/numberphile\/\" data-type=\"URL\" data-id=\"https:\/\/www.janestreet.com\/numberphile\/\">Traversing the Infinite Sidewalk<\/a>. I shared the puzzle with my mathematical friend \u00c9ric, and we had quite some fun discovering its properties.<span id='easy-footnote-1-6271' class='easy-footnote-margin-adjust'><\/span><span class='easy-footnote'><a href='https:\/\/blog.douzeb.is\/?p=6271#easy-footnote-bottom-1-6271' title='See also the &lt;a href=&quot;https:\/\/oeis.org\/wiki\/Welcome&quot; data-type=&quot;URL&quot; data-id=&quot;https:\/\/oeis.org\/wiki\/Welcome&quot;&gt;On-Line Encyclopedia of Integer Sequences&lt;\/a&gt;:&lt;\/p&gt;\n\n\n\n&lt;ul&gt;\n&lt;li&gt;&lt;a rel=&quot;noreferrer noopener&quot; href=&quot;https:\/\/oeis.org\/A358838&quot; data-type=&quot;URL&quot; data-id=&quot;https:\/\/oeis.org\/A358838&quot; target=&quot;_blank&quot;&gt;OEIS sequence A358838&lt;\/a&gt;: Minimum number of jumps needed to go from slab 0 to slab n in Jane Street&amp;rsquo;s infinite sidewalk,&lt;\/li&gt;\n\n\n\n&lt;li&gt;&lt;a rel=&quot;noreferrer noopener&quot; href=&quot;https:\/\/oeis.org\/A359005&quot; data-type=&quot;URL&quot; data-id=&quot;https:\/\/oeis.org\/A359005&quot; target=&quot;_blank&quot;&gt;OEIS sequence A359005&lt;\/a&gt;: Jane Street&amp;rsquo;s infinite sidewalk&amp;rsquo;s greedy walk,&lt;\/li&gt;\n\n\n\n&lt;li&gt;&lt;a rel=&quot;noreferrer noopener&quot; href=&quot;https:\/\/oeis.org\/A359008&quot; data-type=&quot;URL&quot; data-id=&quot;https:\/\/oeis.org\/A359008&quot; target=&quot;_blank&quot;&gt;OEIS sequence A359008&lt;\/a&gt;: Jane Street&amp;rsquo;s infinite sidewalk&amp;rsquo;s greedy walk inverse mapping.&lt;\/li&gt;\n&lt;\/ul&gt;\n\n\n\n&lt;p&gt;'><sup>1<\/sup><\/a><\/span><\/p>\n\n\n\n<p>It is also a testimony to the richness derived from the irrationality of \\(\\log_2(3)\\) and reminiscent of <span class=\"zp-InText-zp-ID--6833562-7U8SN6JE--wp6271 zp-InText-Citation loading\" rel=\"{ 'pages': 'np', 'items': '{6833562:7U8SN6JE}', 'format': '(%a%, %d%, %p%)', 'brackets': '', 'etal': '', 'separator': '', 'and': '' }\"><\/span> about the mathematics underlying the 12-tone Pythagorean temperament and the 53-commas musical scale.<\/p>\n\n\n\n<p>Here goes Jane&rsquo;s story: Jane owns an infinite rosary. It has a single end and is comprised of an infinite number of black and white beads. Starting from the end, the bead positions are numbered \\(n = 0, 1, 2,\\ldots\\) and each bead has a label \\(L(n) = 1, 1, 2, 2, 3, 3,\\ldots\\) Every third bead including the zeroth one is black; the other beads are white.<\/p>\n\n\n\n<style type=\"text\/css\">\n.custom_code_mirror {\n    font-size: 14px;\n    line-height: 16px;\n}\n.overlay {\n    position: absolute; \n    left: 0;\n    top: 0;\n    width: 100%;\n    height: 100%;\n    z-index: 1;\n    background-color: rgba(0,0,0,0); \n}\n<\/style>\n<script>\n  MathJax = {\n    loader: {\n      load: ['[custom]\/xypic.js', '[tex]\/upgreek', '[tex]\/unicode'],\n      paths: {custom: 'https:\/\/cdn.jsdelivr.net\/gh\/sonoisa\/XyJax-v3@3.0.1\/build\/'}\n    },\n    tex: {\n      packages: {'[+]': ['xypic', 'upgreek', 'unicode']},\n      tags: 'ams'\n    },\n    chtml: {\n        scale: 0.95\n    },\n    svg: {\n        scale: 0.95\n    }\n  };\n<\/script>\n<script id=\"MathJax-script\" async=\"\" src=\"https:\/\/cdn.jsdelivr.net\/npm\/mathjax@3.2\/es5\/tex-chtml-full.js\">\n<\/script>\n<script src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/3.6.0\/jquery.min.js\"><\/script>\n<script>\n  $(document).ready(function(){\n    $(\"figcaption\").each(function(index,value){\n      $(this).prepend(\"Figure \"+(++index)+\": \");\n      $('[href=\"#'+$(this).attr(\"id\")+'\"]').text(\"Figure \"+index)\n  });\n});\n<\/script>\n\\(\n    \\def\\black{{\\unicode{x25cf}}}\n    \\def\\white{{\\unicode{x25cb}}}\n    \\def\\bblack{{\\huge\\unicode{x25cf}}}\n    \\def\\bwhite{{\\huge\\unicode{x25cb}}}\n    \\def\\done{{\\bigcirc\\!\\!\\!\\!\\!\\checkmark}}\n    \\def\\todo{{\\bigcirc}}\n    \\def\\donealt{\\unicode{x2d54}}\n    \\def\\todoalt{\\unicode{x2d59}}\n    \\def\\qed{\\quad\\unicode{x25fb}}\n    \\def\\eqdef{{\\stackrel{\\tiny\\mbox{def}}{=}}}\n    \\def\\iffdef{{\\stackrel{\\tiny\\mbox{def}}{\\iff}}}\n    \\def\\N{{\\mathbb{N}}}\n    \\def\\Z{{\\mathbb{Z}}}\n    \\def\\R{{\\mathbb{R}}}\n    \\newcommand{\\card}[1]{{\\mbox{card}( {#1} )}}\n    \\newcommand{\\floor}[1]{{\\lfloor {#1} \\rfloor}}\n    \\newcommand{\\b}[1]{{\\boldsymbol{#1}}}\n\\)\n\n\n\n<div style=\"position:relative; width: 100%; aspect-ratio: 100\/27\">\n<iframe src=\"https:\/\/douzebis.github.io\/jane-s-rosary\/rosary.html?n=10&amp;labels=position&amp;arrows=none\" style=\"width: 100%; aspect-ratio: 100\/27; border: none\" scrolling=\"no\"><\/iframe>\n<a href=\"https:\/\/douzebis.github.io\/jane-s-rosary\/rosary.html?n=10&amp;labels=position&amp;arrows=none&amp;interactive=yes\">\n<div class=\"overlay\"><\/div><\/a>\n<figcaption id=\"janes-rosary-positions\" style=\"text-align: center\">Jane&rsquo;s rosary (beads positions are shown)<\/figcaption>\n<\/div>\n\n\n\n<div style=\"position:relative; width: 100%; aspect-ratio: 100\/27\">\n<iframe src=\"https:\/\/douzebis.github.io\/jane-s-rosary\/rosary.html?n=10&amp;arrows=none&amp;labels=label\" style=\"width: 100%; aspect-ratio: 100\/27; border: none\" scrolling=\"no\"><\/iframe>\n<a href=\"https:\/\/douzebis.github.io\/jane-s-rosary\/rosary.html?n=10&amp;labels=position&amp;arrows=none&amp;interactive=yes\">\n<div class=\"overlay\"><\/div><\/a>\n<figcaption id=\"janes-rosary-labels\" style=\"text-align: center\">Jane&rsquo;s rosary (beads labels are shown)<\/figcaption>\n<\/div>\n\n\n\n<p>Jane tells the beads of her rosary in a special way: each time she is done with a bead (say bead \\(n\\)), she moves on, either <em>up<\/em> to bead \\(n + L(n)\\) or <em>down<\/em> to bead \\(n &#8211; L(n)\\).<\/p>\n\n\n\n<div style=\"position:relative; width: 100%; aspect-ratio:100\/27\">\n<iframe src=\"https:\/\/douzebis.github.io\/jane-s-rosary\/rosary.html?n=10&amp;labels=label&amp;arrows=both\" style=\"width: 100%; aspect-ratio: 100\/27; border:none\" scrolling=\"no\"><\/iframe>\n<a href=\"https:\/\/douzebis.github.io\/jane-s-rosary\/rosary.html?n=10&amp;labels=label&amp;arrows=both&amp;interactive=yes\">\n<div class=\"overlay\"><\/div><\/a>\n<figcaption id=\"janes-rosary-labels\" style=\"text-align: center\">telling the beads of Jane&rsquo;s rosary<\/figcaption>\n<\/div>\n\n\n\n<p>Starting at bead \\(0\\), can Jane tell every bead in her rosary? (That is the question.)<\/p>\n\n\n\n\n\n\n\n<h2>Prelude: names<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>To weave the magic of a thing, you see, one must find its true name out.<\/p>\n<cite>Ursula K. Le Guin,&nbsp;A Wizard of Earthsea<\/cite><\/blockquote>\n\n\n\n<ul>\n<li><strong>Bead<\/strong>: a natural number \\(n \\in \\mathbb{N}\\) (the number represents the position of the bead in Jane&rsquo;s rosary).<\/li>\n\n\n\n<li><strong>Black bead<\/strong>: a bead \\(n\\) divisible by \\(3\\) (denoted \\(3 \\mid n\\)). <br>When we know for sure that a bead is black, we may indicate it with: \\(\\black\\,3n\\). <\/li>\n\n\n\n<li><strong>White bead<\/strong>: a bead \\(n\\) not divisible by \\(3\\) (denoted \\(3 \\not\\mid n\\)).<br>When we know for sure that a bead is white, we may indicate it with: \\(\\white\\,3n+1\\). <\/li>\n\n\n\n<li><strong>Even bead<\/strong>: a bead \\(n\\) divisible by 2 (denoted \\(2 \\mid n\\)).<\/li>\n\n\n\n<li><strong>Odd bead<\/strong>: a bead \\(n\\) not divisible by 2 (denoted \\(2 \\not\\mid n\\)).<\/li>\n\n\n\n<li><strong>Label<\/strong>: the label of bead \\(n\\) is: \\(L(n) = 1 + \\lfloor {n \\over 2}\\rfloor\\), where \\(\\lfloor\\,\\rfloor\\) denotes the <em>floor<\/em> function.<br>\\(L\\) is an increasing function.<\/li>\n\n\n\n<li><strong>Up<\/strong>: going <em>up<\/em> from bead \\(n\\), Jane reaches bead \\(U(n)\\) also denoted \\(nU\\) (postfix notation for unary operator \\(U\\)).<br>\\begin{equation}<br>U: \\mathbb{N}\\rightarrow\\mathbb{N},\\quad n\\mapsto\\lfloor {3n\\over2}\\rfloor + 1<br>\\end{equation}<br>\\(L\\) is a strictly increasing function.<\/li>\n\n\n\n<li><strong>Down<\/strong>: going <em>down<\/em> from bead \\(n&gt;0\\), Jane reaches bead \\(D(n)\\) also denoted \\(n D\\) (postfix notation for unary operator \\(D\\)).<br>\\begin{equation}<br>D: \\mathbb{N}\\rightarrow\\mathbb{N},\\quad n\\mapsto\\lceil {n\\over2}\\rceil &#8211; 1<br>\\end{equation}<br>\\(D\\) is an increasing function.<\/li>\n\n\n\n<li><strong>Lambda<\/strong>: Jane can reach white bead \\(n\\) by performing one <em>up<\/em> move from bead \\(\\lambda(n)\\) also denoted \\(n\\lambda\\) (postfix notation for unary operator \\(\\lambda\\)).<br>\\begin{equation}<br>\\lambda: \\mathbb{N}\\setminus3\\mathbb{N}\\rightarrow\\mathbb{N}, \\quad n\\mapsto\\lfloor{2n\\over3}\\rfloor<br>\\end{equation}<br>\\(\\lambda\\) is a strictly increasing function. Also, it holds that:<br>\\begin{equation}<br>\\forall n\\in\\mathbb{N}\\setminus3\\mathbb{N}, \\quad n = n\\lambda U<br>\\end{equation}<\/li>\n\n\n\n<li><strong>Mu<\/strong>: given any \\(n\\), there is a unique way for Jane to reach bead \\(n\\) while moving <em>down<\/em> from an odd bead, which we denote \\(\\mu(n)\\) or \\(n\\mu\\) (postfix notation for unary operator \\(\\mu\\)).<br>\\begin{equation}<br>\\mu:\\mathbb{N}\\rightarrow\\mathbb{N}, \\quad n\\mapsto2n+1<br>\\end{equation}<br>\\(\\mu\\) is a strictly increasing function. Also, it holds that:<br>\\begin{equation}<br>\\forall n\\in\\mathbb{N}, \\quad n = n\\mu D<br>\\end{equation}<\/li>\n\n\n\n<li><strong>Nu<\/strong>: given any \\(n\\), there is a unique way for Jane to reach bead \\(n\\) while moving <em>down<\/em> from an even bead, which we denote \\(\\nu(n)\\) or \\(n\\nu\\) (postfix notation for unary operator \\(\\nu\\)).<br>\\begin{equation}\\nu:\\mathbb{N}\\rightarrow\\mathbb{N}, \\quad n\\mapsto2n+2<br>\\end{equation}<br>\\(\\nu\\) is a strictly increasing function. Also, it holds that:<br>\\begin{equation}<br>\\forall n\\in\\mathbb{N}, \\quad n = n\\nu D<br>\\end{equation}<\/li>\n\n\n\n<li><strong>Recitation<\/strong>: starting at bead \\(n\\) and randomly moving <em>up<\/em> or <em>down<\/em> finitely or infinitely many times, Janes performs a recitation. In other words a recitation is a sequence of natural numbers \\(\\big(a_n\\big)\\) such that \\(a_0 = n\\) and \\(\\forall i, \\, a_{i+1} \\in \\{a_i U, a_i D\\}\\).<\/li>\n\n\n\n<li><strong>Length<\/strong>: the length of a recitation is the number of moves it comprises, finite or infinite. For a finite recitation of length \\(l\\), we can write: \\[\\exists \\big(M_i\\big)_1^{l}\\in\\{U, D\\}^l,\\quad n_0M_1M_2\\dots M_l = n_l\\]<br>\\(n_0\\) is the start of the recitation. \\(n_l\\) is the end of the recitation.<\/li>\n\n\n\n<li><strong>Minimal recitation<\/strong>: a recitation from bead \\(n\\) to bead \\(m\\), with minimal length. By convention, a minimal recitation to bead \\(m\\) means a minimal recitation from bead \\(0\\) to bead \\(m\\).<\/li>\n\n\n\n<li><strong>Height<\/strong>: the height of bead \\(n\\) (denoted \\(h(n)\\)) is the length of a minimal recitation to bead \\(n\\). As we are about to see, every bead has a finite height.<\/li>\n<\/ul>\n\n\n\n<h2>The height of a bead<\/h2>\n\n\n\n<p>By definition \\(h(0) = 0\\).<\/p>\n\n\n\n<p>What about the height of bean \\(n\\) in general?<\/p>\n\n\n\n<div class=\"has-global-padding is-layout-constrained wp-block-group has-small-font-size\">\n<div style=\"position:relative; width: 100%; aspect-ratio:100\/27\">\n<iframe src=\"https:\/\/douzebis.github.io\/jane-s-rosary\/rosary.html?n=10&amp;labels=label&amp;arrows=to3\" style=\"width: 100%; aspect-ratio: 100\/27; border:none\" scrolling=\"no\"><\/iframe>\n<a href=\"https:\/\/douzebis.github.io\/jane-s-rosary\/rosary.html?n=10&amp;labels=label&amp;arrows=to3&amp;interactive=yes\">\n<div class=\"overlay\"><\/div><\/a>\n<figcaption id=\"height-of-a-bead\" style=\"text-align: center\">the height of bead \\(3\\) is \\(5\\) (beads labels are shown)<\/figcaption>\n<\/div>\n<\/div>\n\n\n\n<p>Given \\(n&gt;0\\), observe that:<\/p>\n\n\n\n<ul>\n<li>\\(3\\not\\mid n \\implies n=mU, \\quad\\) where \\(m = n\\lambda = \\lfloor{2n\\over3}\\rfloor &lt; n\\),<\/li>\n\n\n\n<li>\\(3\\mid n \\land 9\\not\\mid n \\implies n=mU^2D,\\quad\\) where \\(m = n\\mu\\lambda^2 = \\lfloor{8n\\over9}\\rfloor &lt; n\\),<\/li>\n\n\n\n<li>\\(9\\mid n \\implies n=mU^2D, \\quad\\) where \\(m = n\\nu\\lambda^2 = \\lfloor{8n+6\\over9}\\rfloor &lt; n\\).<\/li>\n<\/ul>\n\n\n\n<p>This shows (by induction on \\(n\\)) that every bead has a finite height.\\(\\qed\\)<\/p>\n\n\n\n<p>This also gives two upper bounds:<\/p>\n\n\n\n<p>\\begin{align}<br>\\mbox{for all }n,\\;h(n) \\leq 1+{4n\\over3}\\\\<br>\\mbox{for all }n&gt;0,\\;h(n) \\leq 6{\\log(n)\\over \\log(9\/8)}<br>\\end{align}<\/p>\n\n\n\n<p>The logarithmic bound was suggested by <a href=\"https:\/\/oeis.org\/wiki\/User:Jianing_Song\" data-type=\"URL\" data-id=\"https:\/\/oeis.org\/wiki\/User:Jianing_Song\">Jianing Song<\/a>.<\/p>\n\n\n\n<h3>Computing the height of a bead<\/h3>\n\n\n\n<p>The following simple exploration-based algorithm will do:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block custom_code_mirror\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;zenburn&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;className&quot;:&quot;custom_code_mirror&quot;,&quot;language&quot;:&quot;Python&quot;,&quot;modeName&quot;:&quot;python&quot;}\">def height(n: int) -&gt; int:\n    if n &lt; 0: raise Exception(&quot;n must be a nonnegative integer&quot;)\n    if n == 0: return 0\n    if n == 1: return 1\n    visited = {0, 1}  # the beads we have visited so far\n    rings = [{0}, {1}]  # the beads ordered by height (min length of path from 0)\n    for height in itertools.count(2):\n        new_ring = set()\n        for bead in rings[height - 1]:\n            label = (bead &gt;&gt; 1) + 1\n            for next_bead in {bead - label, bead + label}:\n                if not next_bead in visited:\n                    if next_bead == n: return height\n                    visited.add(next_bead)\n                    new_ring.add(next_bead)\n        rings.append(new_ring)\n<\/pre><\/div>\n\n\n\n<p>Below is a plot of the height function.<\/p>\n\n\n\n<div style=\"position:relative; width: 100%; aspect-ratio:100\/55\">\n<iframe src=\"https:\/\/douzebis.github.io\/jane-s-rosary\/height-plot.html?n=1000\" style=\"width: 100%; aspect-ratio: 100\/55; border:none\" scrolling=\"no\"><\/iframe>\n<a href=\"https:\/\/douzebis.github.io\/jane-s-rosary\/height-plot.html?n=10000\">\n<div class=\"overlay\"><\/div><\/a>\n<figcaption id=\"janes-height-plot\" style=\"text-align: center\">plot of the heights of beads<\/figcaption>\n<\/div>\n\n\n\n<h2>Minimal recitations<\/h2>\n\n\n\n<p>In this section, we study some properties of minimal recitations.<\/p>\n\n\n\n<h3>Minimal recitations ending in a white bead<\/h3>\n\n\n\n<p>The following property holds for any white bead \\(n\\) (\\(3 \\nmid n\\)): there exists a minimal recitation to \\(n\\) that ends in an <em>up<\/em> move. In other words:<\/p>\n\n\n\n\\begin{align}\n&amp;\\forall n\\in\\mathbb{N}\\setminus3\\mathbb{N}, \\quad 3\\not\\mid n \\implies \\exists \\big(M_i\\big)_1^{h(n)-1}\\in\\{U, D\\}^{h(n)-1},\\label{EndsInUp}\\\\\n&amp;\\qquad 0M_1M_2\\dots M_{h(n)-1}U\\mbox{ is a minimal recitation to }n\\nonumber\n\\end{align}\n\n\n\n<p>The proof is by induction on the height of \\(n\\). Assume \\(h\\in\\mathbb{N}\\) given, and assume that for each white bead \\(n\\) of height \\(&lt;h\\), property (\\(\\ref{EndsInUp}\\)) holds. <\/p>\n\n\n\n<p>Further assume (by contradiction) the existence of a white bead \\(n\\) of height \\(h\\) such that no minimal recitation to \\(n\\) ends in <em>up<\/em>. Finally, consider a minimal recitation \\(\\boldsymbol{R}\\) to \\(n\\) (thus necessarily ending in a <em>down<\/em> move).<\/p>\n\n\n\n<p>Being a white bead, \\(n\\) is either of the form \\(3k+1\\) or \\(3k+2\\) for some \\(k\\ge0\\).<\/p>\n\n\n\n<p>Let&rsquo;s first deal with the case where \\(n = 3k+1\\). Observe the following three commutative diagrams:<\/p>\n\n\n\n<div class=\"is-layout-flex wp-container-6 wp-block-columns\">\n<div class=\"is-layout-flow wp-block-column\" style=\"flex-basis:50%\">\n<div class=\"is-vertical is-content-justification-left is-nowrap is-layout-flex wp-container-2 wp-block-group\">\n<p><strong>Case 1<\/strong><\/p>\n\n\n\n\\begin{xy}\n\\xymatrix {\n8k+4 \\ar@{.&gt;}[d]^D \\ar[r]^U &amp; \\white\\,12k+7\\ar@2{&gt;}[d]^D \\ar@{.&gt;}@\/^\/[l]^\\lambda \\\\\n4k+1 \\ar@{.&gt;}[d]^D &amp;\\black\\,6k+3 \\ar@2{&gt;}[d]^D \\ar@{.&gt;}@\/^\/[u]^\\mu \\\\\n2k \\ar@{.&gt;}[r]^U &amp; {\\white\\,3k+1} \\ar@{.&gt;}@\/^\/[u]^\\mu\n}\n\\end{xy}\n<\/div>\n<\/div>\n\n\n\n<div class=\"is-layout-flow wp-block-column\" style=\"flex-basis:50%\">\n<div class=\"is-vertical is-content-justification-left is-nowrap is-layout-flex wp-container-4 wp-block-group\">\n<p><strong>Case 2<\/strong><\/p>\n\n\n\n\\begin{xy}\n\\xymatrix {\n8k+5 \\ar@{.&gt;}[d]^D \\ar[r]^U &amp; \\white\\,12k+8\\ar@2{&gt;}[d]^D \\ar@{.&gt;}@\/^\/[l]^\\lambda \\\\\n4k+2 \\ar@{.&gt;}[d]^D &amp;\\black\\,6k+3 \\ar@2{&gt;}[d]^D \\ar@{.&gt;}@\/^\/[u]^\\nu \\\\\n2k \\ar@{.&gt;}[r]^U &amp; {\\white\\,3k+1} \\ar@{.&gt;}@\/^\/[u]^\\mu\n}\n\\end{xy}\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"is-layout-flex wp-container-11 wp-block-columns\">\n<div class=\"is-layout-flow wp-block-column\" style=\"flex-basis:50%\">\n<div class=\"is-vertical is-content-justification-left is-nowrap is-layout-flex wp-container-7 wp-block-group\">\n<p><strong>Case 3<\/strong><\/p>\n\n\n\n\\begin{xy}\n\\xymatrix {\n4k+2 \\ar@{.&gt;}[d]^D \\ar[r]^U &amp; \\white\\,6k+4\\ar@{.&gt;}@\/^\/[l]^\\lambda \\ar@2{&gt;}[d]^D \\\\\n2k \\ar@{.&gt;}[r]^U &amp; \\white\\,3k+1\\ar@{.&gt;}@\/^\/[u]^\\nu\n}\n\\end{xy}\n<\/div>\n<\/div>\n\n\n\n<div class=\"is-layout-flow wp-block-column\" style=\"flex-basis:50%\">\n<div class=\"is-vertical is-content-justification-left is-nowrap is-layout-flex wp-container-9 wp-block-group\">\n<p><\/p>\n\n\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<p>The ending of recitation \\(\\boldsymbol{R}\\) must correspond to one of the above diagrams. There are three possibilities:<\/p>\n\n\n\n<ul>\n<li>Case 1: \\(\\boldsymbol{R}\\) ends in \\(n = (n\\mu\\mu)D^2\\). Since \\(12k+7\\) is a white bead of height \\(h-2\\), it must have a minimal recitation ending in <em>up<\/em>. Which produces a minimal recitation ending in \\(n = (n\\mu\\mu\\lambda)D^2U\\) &#8211; i.e., <em>down<\/em>&#8211;<em>down<\/em>&#8211;<em>up<\/em>.<\/li>\n\n\n\n<li>Case 2: \\(\\boldsymbol{R}\\) ends in \\(n = (n\\mu\\nu)D^2\\). Since \\(12k+8\\) is a white bead of height \\(h-2\\), it must have a minimal recitation ending in <em>up<\/em>. Which produces another minimal recitation ending in \\(n = (n\\mu\\nu\\lambda)D^2U\\) &#8211; i.e., <em>down<\/em>&#8211;<em>down<\/em>&#8211;<em>up<\/em>.<\/li>\n\n\n\n<li>Case 3: \\(\\boldsymbol{R}\\) ends in \\(n = (n\\nu)D\\). Since \\(6k+4\\) is a white bead of height \\(h-1,\\) it must have a minimal recitation ending in <em>up<\/em>. Which produces another minimal recitation ending in \\(n = (n\\nu\\lambda)DU\\) &#8211; i.e., <em>down<\/em>&#8211;<em>up<\/em>.<\/li>\n<\/ul>\n\n\n\n<p>Each time there is a contradiction because a minimal recitation is produced, which is ending in an <em>up<\/em> move.<\/p>\n\n\n\n<p>Next let&rsquo;s deal with the case where \\(n = 3k+2\\). The corresponding commutative diagrams are as follows:<\/p>\n\n\n\n<div class=\"is-layout-flex wp-container-16 wp-block-columns\">\n<div class=\"is-layout-flow wp-block-column\" style=\"flex-basis:50%\">\n<div class=\"is-vertical is-content-justification-left is-nowrap is-layout-flex wp-container-12 wp-block-group\">\n<p><strong>Case 4<\/strong><\/p>\n\n\n\n\\begin{xy}\n\\xymatrix {\n8k+8 \\ar@{.&gt;}[d]^D \\ar[r]^U &amp; \\white\\,12k+13\\ar@2{&gt;}[d]^D \\ar@{.&gt;}@\/^\/[l]^\\lambda \\\\\n4k+3 \\ar@{.&gt;}[d]^D &amp;\\black\\,6k+6 \\ar@2{&gt;}[d]^D \\ar@{.&gt;}@\/^\/[u]^\\mu \\\\\n2k+1 \\ar@{.&gt;}[r]^U &amp; {\\white\\,3k+2} \\ar@{.&gt;}@\/^\/[u]^\\nu\n}\n\\end{xy}\n<\/div>\n<\/div>\n\n\n\n<div class=\"is-layout-flow wp-block-column\" style=\"flex-basis:50%\">\n<div class=\"is-vertical is-content-justification-left is-nowrap is-layout-flex wp-container-14 wp-block-group\">\n<p><strong>Case 5<\/strong><\/p>\n\n\n\n\\begin{xy}\n\\xymatrix {\n8k+9 \\ar@{.&gt;}[d]^D \\ar[r]^U &amp; \\white\\,12k+14\\ar@2{&gt;}[d]^D \\ar@{.&gt;}@\/^\/[l]^\\lambda \\\\\n4k+4 \\ar@{.&gt;}[d]^D &amp;\\black\\,6k+6 \\ar@2{&gt;}[d]^D \\ar@{.&gt;}@\/^\/[u]^\\nu \\\\\n2k+1 \\ar@{.&gt;}[r]^U &amp; {\\white\\,3k+2} \\ar@{.&gt;}@\/^\/[u]^\\nu\n}\n\\end{xy}\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"is-layout-flex wp-container-21 wp-block-columns\">\n<div class=\"is-layout-flow wp-block-column\" style=\"flex-basis:50%\">\n<div class=\"is-vertical is-content-justification-left is-nowrap is-layout-flex wp-container-17 wp-block-group\">\n<p><strong>Case 6<\/strong><\/p>\n\n\n\n\\begin{xy}\n\\xymatrix {\n4k+3 \\ar@{.&gt;}[d]^D \\ar[r]^U &amp; \\white\\,6k+5\\ar@{.&gt;}@\/^\/[l]^\\lambda \\ar@2{&gt;}[d]^D \\\\\n2k+1 \\ar@{.&gt;}[r]^U &amp; \\white\\,3k+2\\ar@{.&gt;}@\/^\/[u]^\\mu\n}\n\\end{xy}\n<\/div>\n<\/div>\n\n\n\n<div class=\"is-layout-flow wp-block-column\" style=\"flex-basis:50%\">\n<div class=\"is-vertical is-content-justification-left is-nowrap is-layout-flex wp-container-19 wp-block-group\">\n<p><\/p>\n\n\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<p>Again, we have a contradiction since in all cases we can construct a minimal recitation ending in an <em>up<\/em> move. This shows that property (\\(\\ref{EndsInUp}\\)) holds for all white beads. \\(\\qed\\)<\/p>\n\n\n\n<h3>Minimal recitations ending in a black bead<\/h3>\n\n\n\n<p>An consequence of property (\\(\\ref{EndsInUp}\\)) is that for any black bead  \\(n&gt;0, 3\\mid n\\): there exists a minimal recitation to \\(n\\) that ends in an <em>up<\/em>&#8211;<em>down<\/em> sequence. In other words:, for all \\(n\\in\\mathbb{N}, n&gt;0\\):<\/p>\n\n\n\n\\begin{align}\n&amp;\\forall n\\in 3\\mathbb{N}, \\quad n \\gt 0 \\implies \\exists \\big(M_i\\big)_1^{h(n)-2}\\in\\{U, D\\}^{h(n)-2},\\label{EndsInUpDown}\\\\\n&amp;\\qquad 0M_1M_2\\dots M_{h(n)-2}UD \\mbox{ is a minimal recitation to  }n\\nonumber\n\\end{align}\n\n\n\n<p>The proof is similar as for the white beads, with the following two commutative diagrams.<\/p>\n\n\n\n<div class=\"is-layout-flex wp-container-26 wp-block-columns\">\n<div class=\"is-layout-flow wp-block-column\" style=\"flex-basis:50%\">\n<div class=\"is-vertical is-content-justification-left is-nowrap is-layout-flex wp-container-22 wp-block-group\">\n<p><\/p>\n\n\n\n\\begin{xy}\n\\xymatrix {\n4k \\ar[r]^U &amp; \\white\\,6k+1\\ar@{.&gt;}@\/^\/[l]^\\lambda \\ar@2{&gt;}[d]^D \\\\\n&amp; \\black\\,3k \\ar@{.&gt;}@\/^\/[u]^\\mu\n}\n\\end{xy}\n<\/div>\n<\/div>\n\n\n\n<div class=\"is-layout-flow wp-block-column\" style=\"flex-basis:50%\">\n<div class=\"is-vertical is-content-justification-left is-nowrap is-layout-flex wp-container-24 wp-block-group\">\n<p><\/p>\n\n\n\n\\begin{xy}\n\\xymatrix {\n4k+1 \\ar[r]^U &amp; \\white\\,6k+2\\ar@{.&gt;}@\/^\/[l]^\\lambda \\ar@2{&gt;}[d]^D \\\\\n&amp; \\black\\,3k \\ar@{.&gt;}@\/^\/[u]^\\nu\n}\n\\end{xy}\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<h2>Interlude: more names<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>Hey, Louie. The man is dry. Give him one on the house, okay?<\/p>\n<cite>Ridley Scott, Blade Runner (1982)<\/cite><\/blockquote>\n\n\n\n<ul>\n<li><strong>Eager recitation<\/strong>: a recitation that only moves <em>up<\/em>.<\/li>\n\n\n\n<li><strong>Seed<\/strong>: the seed of bead \\(n\\) (denoted \\(\\sigma(n)\\)) is the black bead from which \\(n\\) can be reached via an eager recitation (only <em>up<\/em> moves).<\/li>\n\n\n\n<li><strong>Lambex<\/strong>: the lambex of bead \\(n\\) (denoted \\(\\Lambda(n)\\)) is the number of <em>up<\/em> moves required to reach \\(n\\) from its seed \\(\\sigma(n)\\). In other words: \\(n = \\sigma(n)U^{\\Lambda(n)}\\) or equivalently \\(\\sigma(n) = n\\lambda^{\\Lambda(n)}.\\)<\/li>\n\n\n\n<li><strong>Up-chains<\/strong>: we call up-chain starting at bead \\(n\\) (denoted \\(\\uparrow\\!(n)\\)) the set of beads reachable by an eager recitation (only <em>up<\/em> moves) from bead \\(n\\):<br>\\begin{align}<br>&amp;\\uparrow\\!(n) \\eqdef \\{nU^i \\mid i \\in \\mathbb{N}\\}<br>\\end{align}<br>Note that:<br>\\begin{align}<br>\\mathbb{N} = \\biguplus_{n\\in\\mathbb{N}}\\uparrow\\!(3n)<br>\\end{align}<\/li>\n\n\n\n<li><strong>Down-chains<\/strong>: we call down-chain starting at bead \\(n\\) (denoted \\(\\downarrow\\!(n)\\)) the set of beads reachable by downwards recitation (only <em>down<\/em> moves) from bead \\(n\\):<br>\\begin{align}<br>&amp;\\downarrow\\!(n) \\eqdef \\{nD^i \\mid i \\in \\mathbb{N}\\}<br>\\end{align}<br>Note that every down-chain is finite and ends in \\(0\\).<\/li>\n\n\n\n<li><strong>Jane&rsquo;s reluctant recitation<\/strong>: Jane starts the reluctant recitation at bead \\(0\\) and always moves <em>down<\/em> rather than <em>up<\/em>, unless moving <em>down<\/em> would lead to a bead that Jane has already visited, in which case Jane reluctantly moves <em>up<\/em>. See <a href=\"#figure-9\" data-type=\"internal\" data-id=\"#figure-9\">figure 9<\/a> for an illustration.<\/li>\n\n\n\n<li><strong>Rho<\/strong>: \\(\\rho(i)\\) is the \\(i\\)<sup>th<\/sup> bead in Jane&rsquo;s reluctant recitation. For instance, \\(\\rho(0) = 0\\), \\(\\rho(5) = 3\\), \\(\\rho(13) = 12\\). See <a href=\"#fig-reluctant-never-blocks\" data-type=\"internal\" data-id=\"#fig-reluctant-never-blocks\">figure 10<\/a> for an illustration.<br>By construction, \\(\\rho\\) is an injective function. And \\(\\rho(i)\\) is actually well defined for all \\(i\\ge0\\), as we will see later.<\/li>\n<\/ul>\n\n\n\n<h2>The structure of Jane&rsquo;s rosary<\/h2>\n\n\n\n<p>The partitioning of Jane&rsquo;s rosary in up-chains produces an interesting one-to-one mapping \\(\\gamma\\) between \\(\\mathbb{N}\\) and \\(\\mathbb{N}\\times\\mathbb{N}\\):<\/p>\n\n\n\n<p>\\[\\gamma(n) \\stackrel{def}{=} \\Big({\\sigma(n)\\over3}, \\Lambda(n)\\Big)\\]<\/p>\n\n\n\n<p>This is illustrated by <a href=\"#rosary-structure\" data-type=\"internal\" data-id=\"#rosary-structure\">#rosary-structure<\/a>.<\/p>\n\n\n\n<div id=\"fig-rosary-deconstructed\" class=\"has-global-padding is-layout-constrained wp-block-group has-small-font-size\">\n<div style=\"position: relative; width: 100%; aspect-ratio: 1\">\n<iframe src=\"https:\/\/douzebis.github.io\/jane-s-rosary\/deconstructed.html?n=0&amp;width=9&amp;height=9&amp;ordering=none&amp;label=position&amp;color=none&amp;arrows=none\" style=\"width: 100%; aspect-ratio: 1; border: none\" scrolling=\"no\"><\/iframe>\n<a href=\"https:\/\/douzebis.github.io\/jane-s-rosary\/deconstructed.html?n=0&amp;width=9&amp;height=9&amp;ordering=none&amp;label=position&amp;color=none&amp;arrows=none&amp;interactive=yes\">\n<div class=\"overlay\"><\/div><\/a>\n<figcaption id=\"rosary-structure\" style=\"text-align: center\">Jane&rsquo;s rosary deconstructed (beads grouped by up-chains)<\/figcaption>\n<\/div>\n<\/div>\n\n\n\n<p>With this mapping, the beads&rsquo; heights have a clean representation:<\/p>\n\n\n\n<div class=\"has-global-padding is-layout-constrained wp-block-group has-small-font-size\">\n<div style=\"position: relative; width: 100%; aspect-ratio: 1\">\n<iframe src=\"https:\/\/douzebis.github.io\/jane-s-rosary\/deconstructed.html?n=0&amp;width=9&amp;height=9&amp;ordering=canonic&amp;label=height&amp;color=height&amp;arrows=yes\" style=\"width: 100%; aspect-ratio: 1; border: none\" scrolling=\"no\"><\/iframe>\n<a href=\"https:\/\/douzebis.github.io\/jane-s-rosary\/deconstructed.html?n=0&amp;width=9&amp;height=9&amp;ordering=canonic&amp;label=height&amp;color=height&amp;arrows=yes&amp;interactive=yes\">\n<div class=\"overlay\"><\/div><\/a>\n<figcaption id=\"rosary-structure-heights\" style=\"text-align: center\">Jane&rsquo;s rosary deconstructed (beads heights are shown)<\/figcaption>\n<\/div>\n<\/div>\n\n\n\n<h2>Theorem 1: minimal recitations ending in a black bead<\/h2>\n\n\n\n<p>Theorem 1 further studies the properties of minimal recitations ending in a black bead. Let \\(3n&gt;0\\) be a black bead.<\/p>\n\n\n\n<p>The following properties hold:<\/p>\n\n\n\n\\begin{align}\n&amp;\\sigma(\\mu(3n)) \\neq \\sigma(\\nu(3n))\\label{th1_sigma}\\\\\n&amp;\\Lambda(\\mu(3n)) \\neq \\Lambda(\\nu(3n))\\label{th1_lambda}\\\\\n&amp;\\Lambda(\\mu(3n))\\gt\\Lambda(\\nu(3n)) \\iff \\sigma(\\mu(3n)) \\lt \\sigma(\\nu(3n))\\label{th1_sigma_lambda}\\\\\n&amp;h(3n)\\ge h(3n-1)\\label{th1_minus_one}\\\\\n&amp;h(3n)\\ge h(3n+1)\\label{th1_plus_one}\\\\\n&amp;\\Lambda(\\mu(3n))\\gt\\Lambda(\\nu(3n))\\implies\\label{th1_mu}\\\\\n&amp;\\qquad\\exists\\mbox{ minimal recitation to }3n\\mbox{ ending in }\\sigma(\\mu(3n))U^{\\Lambda(\\mu(3n))}D\\nonumber\\\\\n&amp;\\Lambda(\\nu(3n))\\gt\\Lambda(\\mu(3n))\\implies\\label{th1_nu}\\\\\n&amp;\\qquad\\exists\\mbox{ minimal recitation to }3n\\mbox{ ending in }\\sigma(\\nu(3n))U^{\\Lambda(\\nu(3n))}D\\nonumber\n\\end{align}\n\n\n\n<p>In particular, this shows that which of \\(\\mu(3n)\\) or \\(\\nu(3n)\\) belongs to a minimal recitation to \\(3n\\) is determined by which has the larger lambex (and the smaller seed).<\/p>\n\n\n\n<p>This is illustrated in <a href=\"#figure-7\" data-type=\"internal\" data-id=\"#figure-7\">figure 7<\/a>: the solid arrows point to predecessors with lower lambex, the dashed arrows point to predecessors with larger lambex.<\/p>\n\n\n\n<div id=\"figure-7\" class=\"has-global-padding is-layout-constrained wp-block-group has-small-font-size\">\n<div style=\"position: relative; width: 100%; aspect-ratio: 1\">\n<iframe src=\"https:\/\/douzebis.github.io\/jane-s-rosary\/deconstructed.html?n=0&amp;width=9&amp;height=9&amp;ordering=back&amp;label=position&amp;color=position&amp;arrows=yes\" style=\"width: 100%; aspect-ratio: 1; border: none\" scrolling=\"no\"><\/iframe>\n<a href=\"https:\/\/douzebis.github.io\/jane-s-rosary\/deconstructed.html?n=0&amp;width=9&amp;height=9&amp;ordering=back&amp;label=position&amp;color=position&amp;arrows=yes&amp;interactive=yes\">\n<div class=\"overlay\"><\/div><\/a>\n<figcaption id=\"when-in-doubt\" style=\"text-align: center\">when in doubt, choose the predecessor with a lower lambex<\/figcaption>\n<\/div>\n<\/div>\n\n\n\n<p>Theorem 1 guarantees the correctness of the following improved algorithm for computing \\(h(n)\\) with complexity \\(\\log(n)\\) in time and contant complexity in space:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block custom_code_mirror\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;zenburn&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;className&quot;:&quot;custom_code_mirror&quot;,&quot;language&quot;:&quot;Python&quot;,&quot;modeName&quot;:&quot;python&quot;}\">def height(n: int) -&gt; int:\n    if n &lt; 0: raise 'param must be nonnegative'\n    h = 0\n    while True:\n        if n == 0: return h\n        h += 1\n        match n%3:\n            case 0:\n                h += 1\n                n=(4*n+2)\/\/3\n                while True:\n                    h += 1\n                    match n%3:\n                        case 0:\n                            n = (2*n)\/\/3\n                            break\n                        case 1:\n                            n = (2*n)\/\/3\n                        case 2:\n                            n = (2*n)\/\/3 + 1\n                            break\n            case _:\n                n = (2*n)\/\/3<\/pre><\/div>\n\n\n\n<p>(\\(\\ref{th1_sigma}\\)), (\\(\\ref{th1_lambda}\\)) and (\\(\\ref{th1_sigma_lambda}\\)) are easy.<\/p>\n\n\n\n<p>The remainder of the proof is by induction on the height of \\(3n\\).<\/p>\n\n\n\n<p>We can easily check that (\\(\\ref{th1_minus_one}\\)), (\\(\\ref{th1_plus_one}\\)), (\\(\\ref{th1_mu}\\)) and (\\(\\ref{th1_nu}\\)), are true for all \\(n\\) such that \\(h(3n)\\le5\\).<\/p>\n\n\n\n<p>Now assume \\(h&gt;0\\) given, such that (\\(\\ref{th1_minus_one}\\)), (\\(\\ref{th1_plus_one}\\)), (\\(\\ref{th1_mu}\\)) and (\\(\\ref{th1_nu}\\)), are true for for all \\(n\\) such that \\(h(3n)\\lt h\\). Further consider a black bead \\(3n\\) of height \\(h\\).<\/p>\n\n\n\n<p>The following diagram (where \\(s\\) is the successor function: \\(s(k) = k+1\\)) is well defined and commutes:<\/p>\n\n\n\n\\begin{xy}\n\\xymatrix {\n&amp; b_1=4n+1                                               &amp;&amp;&amp;\n    \\white\\,6n+2\\ar[lll]^(0.6){\\lambda}                                   \\\\\na_1=4n\\ar[ur]^s                                                   &amp;&amp;\n    \\white\\,6n+1\\ar[ll]^(0.4){\\lambda}\\ar[rru]^s                          \\\\\n                                                             &amp;&amp;&amp;\n                        \\black\\,3n\\ar[dr]^s\\ar[lu]^\\mu\\ar[uur]^(0.2)\\nu   \\\\\n&amp; d_1=2n\\ar[uuu]^(0.4)\\mu                                &amp;&amp;&amp;\n    \\white\\,3n+1\\ar[lll]^(0.6){\\lambda}                                   \\\\\nc_1=2n-1\\ar[ur]^s\\ar[uuu]^(0.4)\\nu                                &amp;&amp;\n    \\white\\,3n-1\\ar[uur]^(0.7)s\\ar[ll]^(0.4){\\lambda}\n}\n\\end{xy}\n\n\n\n<p>Observe that \\(c_1 = D(a_1)\\), \\(d_1 = D(b_1)\\), \\(b_1 = s(a_1)\\), \\(d_1 = s(c_1)\\). Also, depending on \\(n\\bmod3\\), the possibilities for \\(a_1\\), \\(b_1\\), \\(c_1\\), \\(d_1\\) are: \\[<br>\\begin{array}{c|cccc}<br>  n\\bmod3 &amp; a_1\\bmod3 &amp; b_1\\bmod3 &amp; c_1\\bmod3 &amp; d_1\\bmod3\\\\<br>\\hline<br>  0 &amp; \\black\\;0 &amp; \\white\\;1 &amp; \\white\\;2 &amp; \\black\\;0\\\\<br>  1 &amp; \\white\\;1 &amp; \\white\\;2 &amp; \\white\\;1 &amp; \\white\\;2\\\\<br>  2 &amp; \\white\\;2 &amp; \\black\\;0 &amp; \\black\\;0 &amp; \\white\\;1<br>\\end{array}\\]<\/p>\n\n\n\n<p>So depending on \\(n\\bmod3\\), the \u00ab\u00a0\\(\\lambda\\)-step\u00a0\u00bb either creates two black beads (\\(b_1\\) and \\(c_1\\) or \\(a_1\\) and \\(d_1\\)), or it creates no black beads at all. When no black beads are created, the \u00ab\u00a0\\(\\lambda\\) steps\u00a0\u00bb can be applied again. Let&rsquo;s see how it goes.<\/p>\n\n\n\n<p>Assuming four white beads \\(a_i\\), \\(b_i\\), \\(c_i\\), \\(d_i\\) where \\(c_i = D(a_i)\\), \\(d_i = D(b_i)\\), \\(b_i = s(a_i)\\) and \\(d_i = s(c_i)\\), the only possible configuration is described by the following  two diagrams:<\/p>\n\n\n\n<div class=\"is-nowrap is-layout-flex wp-container-30 wp-block-group\">\n\\begin{xy}\n\\xymatrix {\n&amp;\\quad\\white\\;b_i\\quad\\ar[dd]_D\\\\\n\\quad\\white\\;a_i\\quad\\ar[ur]^s\\ar[dd]_D\\\\\n&amp;\\quad\\white\\;d_i\\quad\\quad\\\\\n\\quad\\white\\;c_i\\quad\\ar[ur]^s\n}\n\\end{xy}\n\n\n\n\\begin{xy}\n\\xymatrix {\n&amp;b_i=6k+5\\\\\na_i=6k+4\\ar[ur]^s\\\\\n&amp;d_i=3k+2\\ar[uu]^\\mu\\\\\nc_i=3k+1\\ar[ur]^s\\ar[uu]^\\nu\n}\n\\end{xy}\n<\/div>\n\n\n\n<div class=\"is-layout-flex wp-container-32 wp-block-columns\" style=\"padding-top:0;padding-right:0;padding-bottom:0;padding-left:0\">\n<div class=\"is-layout-flow wp-block-column\" style=\"flex-basis:100%\">\n<p>Applying a \u00ab\u00a0\\(\\lambda\\)-step\u00a0\u00bb to the left gives the following commutative diagram:<\/p>\n<\/div>\n<\/div>\n\n\n\n\\begin{xy}\n\\xymatrix {\n&amp; b_{i+1}=4k+3                                                 &amp;&amp;\n    \\white\\,b_i=6k+5\\ar[ll]^(0.6){\\lambda}                                 \\\\\na_{i+1}=4k+2\\ar[ur]^s                                              &amp;&amp;\n    \\white\\,a_i=6k+4\\ar[ll]^(0.4){\\lambda}\\ar[ur]^s                        \\\\\n&amp; d_{i+1}=2k+1\\ar[uu]^(0.3)\\mu                                 &amp;&amp;\n    \\white\\,d_i=3k+2\\ar[uu]_(0.3)\\mu\\ar[ll]^(0.6){\\lambda}                 \\\\\nc_{i+1}=2k\\ar[ur]^s\\ar[uu]^(0.3)\\nu                                &amp;&amp;\n    \\white\\,c_i=3k+1\\ar[ur]^(0.4)s\\ar[uu]_(0.3)\\nu\\ar[ll]^(0.4){\\lambda}\n}\n\\end{xy}\n\n\n\n<p>Where \\(c_{i+1} = D(a_{i+1})\\), \\(d_{i+1} = D(b_{i+1})\\), \\(b_{i+1} = s(a_{i+1})\\), \\(d_{i+1} = s(c_{i+1})\\), and depending on \\(k\\bmod3\\), the possibilities for \\(a_{i+1}\\), \\(b_{i+1}\\), \\(c_{i+1}\\), \\(d_{i+1}\\) are: \\[<br>\\begin{array}{c|cccc}<br>  k\\bmod3 &amp; a_{i+1}\\bmod3 &amp; b_{i+1}\\bmod3 &amp; c_{i+1}\\bmod3 &amp; d_1{i+1}\\bmod3\\\\<br>\\hline<br>  0 &amp; \\white\\;2 &amp; \\black\\;0 &amp; \\black\\;0 &amp; \\white\\;1\\\\<br>  1 &amp; \\black\\;0 &amp; \\white\\;1 &amp; \\white\\;2 &amp; \\black\\;0\\\\<br>  2 &amp; \\white\\;1 &amp; \\white\\;2 &amp; \\white\\;1 &amp; \\white\\;2<br>\\end{array}\\]<\/p>\n\n\n\n<p>This shows that the \u00ab\u00a0\\(\\lambda\\)-step\u00a0\u00bb can be repeatedly applied \\(i\\gt0\\) times until two black beads are created, either \\(b_i\\) and \\(c_i\\) or \\(a_i\\) and \\(d_i\\). Note that the \u00ab\u00a0\\(\\lambda\\)-steps\u00a0\u00bb cannot be indefinitely applied, since this would result in an infinitely descending sequence \\((c_i)\\).<\/p>\n\n\n\n<p>On the one hand, if \\(b_i\\) and \\(c_i\\) are the black beads, the configuration is summarized by the following commutative diagram:<\/p>\n\n\n\n\\begin{xy}\n\\xymatrix {\n&amp; \\black\\,b_i                                             &amp;&amp;&amp;\n    \\white\\,6n+2\\ar[lll]^(0.7){\\lambda^i}                                  \\\\\n\\white\\,a_i\\ar[ur]^s\\ar@{.&gt;}@\/^\/[rr]^(0.6){U^i}                 &amp;&amp;\n    \\white\\,6n+1\\ar[rru]^s\\ar[ll]^(0.4){\\lambda^i}\n                \\ar@{.&gt;}@\/^\/[dr]^(0.6){D}                               \\\\\n                                                              &amp;&amp;&amp;\n                        \\black\\,3n\\ar[dr]^s\\ar[lu]^\\mu\\ar[uur]^(0.2)\\nu    \\\\\n&amp; \\white\\,d_i\\ar[uuu]^(0.4)\\mu                            &amp;&amp;&amp;\n    \\white\\,3n+1\\ar[lll]^(0.7){\\lambda^i}                                  \\\\\n\\black\\,c_i\\ar[ur]^s\\ar[uuu]^(0.4)\\nu                              &amp;&amp;\n    \\white\\,3n-1\\ar[uur]^(0.7)s\\ar[ll]^(0.4){\\lambda^i}\n}\n\\end{xy}\n\n\n\n<p>and the following deductions can be made:<\/p>\n\n\n\n<ul>\n<li>\\(\\Lambda(\\mu(3n))\\gt\\Lambda(\\nu(3n))\\),<\/li>\n\n\n\n<li>\\(a_i\\) belongs to a minimal recitation to \\(3n\\). If it did not, \\(b_i\\) would belong to a minimal recitation to \\(3n\\), we would have \\(h(b_i)=h(3n)-i-1\\lt h\\), and by induction hypothesis (\\ref{th1_minus_one}) we could write the following contradiction:<br>\\[h(a_i)+i+1 \\gt h(3n) = h(b_i)+i+1 \\ge h(a_i)+i+1,\\]<\/li>\n\n\n\n<li>there is a minimal recitation to \\(3n\\) ending in \\(a_i U^iD\\),<\/li>\n\n\n\n<li>there is a minimal recitation to \\(3n\\) ending in \\(\\sigma(\\mu(3n))U^{\\Lambda(\\mu(3n))}D\\),<\/li>\n\n\n\n<li>\\(h(3n-1) \\le h(a_i)+1+i = h(3n)\\),<\/li>\n\n\n\n<li>\\(h(c_i)\\le h(a_i)+1\\lt h(3n) = h\\), and by induction hypothesis (\\ref{th1_plus_one}) we can write: \\(h(3n+1) \\le h(d_i)+i \\le h(c_i)+i \\le (h(a_i)+1)+i = h(3n)\\).<\/li>\n<\/ul>\n\n\n\n<p>On the other hand, if \\(a_i\\) and \\(d_i\\) are the black beads, the configuration is summarized by the following commutative diagram:<\/p>\n\n\n\n\\begin{xy}\n\\xymatrix {\n&amp; \\white\\,b_i\\ar@{.&gt;}@\/^\/[rrr]^(0.6){U^i}              &amp;&amp;&amp;\n    \\white\\,6n+2\\ar[lll]^(0.6){\\lambda_i}\n                \\ar@{.&gt;}@\/^\/[ddl]^(0.6)D                               \\\\\n\\black\\,a_i\\ar[ur]^s                                               &amp;&amp;\n    \\white\\,6n+1\\ar[rru]^s\\ar[ll]^(0.4){\\lambda_i}                         \\\\\n                                                              &amp;&amp;&amp;\n                        \\black\\,3n\\ar[dr]^s\\ar[lu]^\\mu\\ar[uur]^(0.2)\\nu    \\\\\n&amp; \\black\\,d_i\\ar[uuu]^(0.4)\\mu                            &amp;&amp;&amp;\n    \\white\\,3n+1\\ar[lll]^(0.6){\\lambda_i}                                  \\\\\n\\white\\,c_i\\ar[ur]^s\\ar[uuu]^(0.4)\\nu                              &amp;&amp;\n    \\white\\,3n-1\\ar[uur]^(0.7)s\\ar[ll]^(0.4){\\lambda_i}\n}\n\\end{xy}\n\n\n\n<p>and similarly, the following deductions can be made:<\/p>\n\n\n\n<ul>\n<li>\\(\\Lambda(\\nu(3n))\\gt\\Lambda(\\mu(3n))\\),<\/li>\n\n\n\n<li>\\(b_i\\) belongs to a minimal recitation to \\(3n\\),<\/li>\n\n\n\n<li>there is a minimal recitation to \\(3n\\) ending in \\(\\sigma(\\nu(3n))U^{\\Lambda(\\nu(3n))}D\\),<\/li>\n\n\n\n<li>\\(h(3n-1) \\le  h(3n)\\),<\/li>\n\n\n\n<li>\\(h(3n+1) \\le h(3n)\\).<\/li>\n<\/ul>\n\n\n\n<p>Overall, properties (\\(\\ref{th1_minus_one}\\)), (\\(\\ref{th1_plus_one}\\)), (\\(\\ref{th1_mu}\\)) and (\\(\\ref{th1_nu}\\)) hold for all \\(n\\) such that \\(h(3n)=h.\\qed\\)<\/p>\n\n\n\n<h2>Jane&rsquo;s reluctant recitation<\/h2>\n\n\n\n<p>The reluctant recitation was suggested by <a href=\"https:\/\/oeis.org\/wiki\/User:Neal_Gersh_Tolunsky\" data-type=\"URL\" data-id=\"https:\/\/oeis.org\/wiki\/User:Neal_Gersh_Tolunsky\">Neal Gersh Tolunsky<\/a>. The recitation starts at bead \\(0\\) and Jane tells the beads, always preferring to move <em>down<\/em> rather than <em>up<\/em>, unless moving&nbsp;<em>down<\/em>&nbsp;would lead to a bead that Jane has already visited, in which case Jane reluctantly moves&nbsp;<em>up<\/em>.<\/p>\n\n\n\n<p>The following figure illustrate the moves of the reluctant recitation.<\/p>\n\n\n\n<div class=\"has-global-padding is-layout-constrained wp-block-group has-small-font-size\">\n<!--\n<div style=\"position: relative; width: 100%; aspect-ratio: 1\">\n<iframe src=\"https:\/\/douzebis.github.io\/jane-s-rosary\/deconstructed.html?n=0&amp;width=9&amp;height=9&amp;ordering=reluctant&amp;label=reluctant_inv&amp;color=reluctant_inv&amp;arrows=yes\" style=\"width: 100%; aspect-ratio: 1; border: none\" scrolling=\"no\"><\/iframe>\n<a href=\"https:\/\/douzebis.github.io\/jane-s-rosary\/deconstructed.html?n=0&amp;width=9&amp;height=9&amp;ordering=reluctant&amp;label=reluctant_inv&amp;color=reluctant_inv&amp;arrows=yes&amp;interactive=yes\">\n<div class=\"overlay\"><\/div><\/a>\n<figcaption id=\"reluctant-recitation\" style=\"text-align: center\">Jane's reluctant recitation<\/figcaption>\n<\/div>\n-->\n<\/div>\n\n\n\n<div id=\"figure-9\" class=\"has-global-padding is-layout-constrained wp-block-group has-small-font-size\">\n<div style=\"position: relative; width: 100%; aspect-ratio: 1\">\n<iframe src=\"https:\/\/douzebis.github.io\/jane-s-rosary\/deconstructed.html?n=0&amp;width=9&amp;height=9&amp;ordering=reluctant&amp;label=position&amp;color=reluctant_inv&amp;arrows=labelled\" style=\"width: 100%; aspect-ratio: 1; border: none\" scrolling=\"no\"><\/iframe>\n<a href=\"https:\/\/douzebis.github.io\/jane-s-rosary\/deconstructed.html?n=0&amp;width=9&amp;height=9&amp;ordering=reluctant&amp;label=position&amp;color=reluctant_inv&amp;arrows=labelled&amp;interactive=yes\">\n<div class=\"overlay\"><\/div><\/a>\n<figcaption id=\"reluctant-recitation-positions\" style=\"text-align: center\">Jane&rsquo;s reluctant recitation (beads positions are shown)<\/figcaption>\n<\/div>\n<\/div>\n\n\n\n<p>The following algorithm computes \\(\\rho(i)\\):<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block custom_code_mirror\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;zenburn&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;className&quot;:&quot;custom_code_mirror&quot;,&quot;language&quot;:&quot;Python&quot;,&quot;modeName&quot;:&quot;python&quot;}\">def rho(i: int) -&gt; int:\n    if i &lt; 0: raise Exception(&quot;argument must be nonnegative&quot;)\n    if i == 0: return 0\n    visited = {0: 0}\n    bead = 1\n    for age in range(1, i):\n        visited[bead] = age\n        label = 1 + bead\/\/2\n        if not bead - label in visited:\n            bead -= label  # moving down\n        else:\n            bead += label  # moving up\n    return bead<\/pre><\/div>\n\n\n\n<h2>Theorem 2: Jane&rsquo;s reluctant recitation never halts<\/h2>\n\n\n\n<p>While performing the reluctant recitation, Jane moving on to bead \\(n\\) never causes a gap to appear in the rosary&rsquo;s up-chains &#8211; i.e., a gap in the sequence \\(\\sigma(n), \\sigma(n)U, \\cdots, \\sigma(n)U^{\\Lambda(n)}=n\\).<\/p>\n\n\n\n<p>This ensures that the reluctant-recitation never halts.<\/p>\n\n\n\n<div id=\"fig-reluctant-never-blocks\" class=\"has-global-padding is-layout-constrained wp-block-group has-small-font-size\">\n<div style=\"position: relative; width: 100%; aspect-ratio: 1\">\n<iframe src=\"https:\/\/douzebis.github.io\/jane-s-rosary\/deconstructed.html?n=21&amp;width=6&amp;height=6&amp;ordering=reluctant&amp;label=position&amp;color=reluctant_inv&amp;arrows=labelled\" style=\"width: 100%; aspect-ratio: 1; border: none\" scrolling=\"no\"><\/iframe>\n<a href=\"https:\/\/douzebis.github.io\/jane-s-rosary\/deconstructed.html?n=31&amp;width=9&amp;height=9&amp;ordering=reluctant&amp;label=position&amp;color=reluctant_inv&amp;arrows=labelled&amp;interactive=yes\">\n<div class=\"overlay\"><\/div><\/a>\n<figcaption id=\"reluctant-never-halts\" style=\"text-align: center\">Jane&rsquo;s reluctant recitation never halts<\/figcaption>\n<\/div>\n<\/div>\n\n\n\n<p>The proof is by contradiction and by induction on the index \\(i\\) or the first move that would create a gap.<\/p>\n\n\n\n<p>Looking at <a href=\"#reluctant-never-halts\" data-type=\"internal\" data-id=\"#reluctant-never-halts\">#reluctant-never-halts<\/a>, we see that moves up to the \\(20\\)<sup>th<\/sup> do not create a gap.<\/p>\n\n\n\n<p>Now assume (by contradiction) the existence of \\(i\\ge0\\) such that none of Jane&rsquo;s reluctant moves prior to \\(i\\) has created a gap but Jane&rsquo;s \\(i\\)<sup>th<\/sup> move creates a gap by reaching bead \\(n=\\rho(i).\\)<\/p>\n\n\n\n<p>Since an <em>up<\/em> move cannot create a gap in an up-chain, it holds that \\(n = \\rho(i-1)D\\).<\/p>\n\n\n\n<p>Since a gap is created, \\(\\rho(i)\\) must be a white bead (non divisible by \\(3\\)) and there must be a gap \\(g\\) just \u00ab\u00a0to the left\u00a0\u00bb of \\(n\\) in the up-chain, at the moment \\(n\\) is reached:<\/p>\n\n\n\n<p>\\[g = \\lambda(n).\\]<\/p>\n\n\n\n<p>We must consider two cases: \\(n = 3k+1\\) and \\(n = 3k+2\\).<\/p>\n\n\n\n<h3>Gap \u00ab\u00a0to the left\u00a0\u00bb of \\(3k + 1\\)<\/h3>\n\n\n\n<p>Consider the case \\(\\rho(i) = 3k+1\\).<\/p>\n\n\n\n<p>If \\(\\rho(i-1) = \\rho(i)\\nu\\), then one of the two following commutative diagrams holds, where \\(\\done_a\\) indicates \\(\\rho(i-a)\\):<\/p>\n\n\n\n<div class=\"is-content-justification-left is-nowrap is-layout-flex wp-container-36 wp-block-group\">\n\\begin{xy}\n\\xymatrix {\n\\bbox[5pt]{ }\\\\\n\\done_2:4k+2\\ar@{.&gt;}[d]^D\\ar[r]^U          &amp; \\done_1:6k+4\\ar[d]^D   \\\\\n\\todo:g=2k\\ar@{.&gt;}[r]^U            &amp; \\done_0:3k+1\\ar@\/^\/[u]^\\nu\n}\n\\end{xy}\n\n\n\n\\begin{xy}\n\\xymatrix {\n&amp; \\done_2\\ar[d]_D              \\\\\n\\done_j:4k+2\\ar@{.&gt;}[d]^D\\ar@{.&gt;}[r]^U          &amp; \\done_1:6k+4\\ar[d]^D   \\\\\n\\todo:g=2k\\ar@{.&gt;}[r]^U            &amp; \\done_0:3k+1\\ar@\/^\/[u]^\\nu\n}\n\\end{xy}\n<\/div>\n\n\n\n<p>The left hand side diagram brings a contradiction, since from \\(\\done_2\\) Jane should have moved <em>down<\/em> to \\(g=\\todo\\), rather than <em>up<\/em> to \\(\\done_1\\).<\/p>\n\n\n\n<p>The right hand side diagram also brings a contradiction: since \\(\\done_1\\) has not created a gap (induction hypothesis), \\(4k+2\\) must have been visited at some earlier step \\(\\done_j\\), and from \\(\\done_j\\) Jane should have moved <em>down<\/em> to \\(\\todo\\).<\/p>\n\n\n\n<p>Consequently \\(\\rho(i-1) = \\rho(i)\\nu = 6k+3\\) is a black bead, and we must consider two subcases: \\(\\rho(i-2) = \\rho(i-1)\\mu\\) and \\(\\rho(i-2) = \\rho(i-1)nu\\)<\/p>\n\n\n\n<h4>Subcase: \\(\\rho(i-2) = \\rho(i-1)\\mu\\)<\/h4>\n\n\n\n<p>If \\(\\rho(i-2) = \\rho(i-1)\\mu\\), then one of the two following commutative diagrams holds:<\/p>\n\n\n\n<div class=\"is-content-justification-left is-nowrap is-layout-flex wp-container-37 wp-block-group\">\n\\begin{xy}\n  \\xymatrix {\n  \\bbox[5pt]{ }\\\\\n  \\done_3:8k+4\\ar@{.&gt;}[d]^D\\ar[r]^U  &amp; \\done_2:12k+7\\ar[d]^D   \\\\\n  \\done_j:4k+2\\ar@{.&gt;}[d]^D          &amp; \\done_1:6k+3\\ar[d]^D\\ar@\/^\/[u]^\\mu   \\\\\n  \\todo:g=2k\\ar@{.&gt;}[r]^U            &amp; \\done_0:3k+1\\ar@\/^\/[u]^\\mu\n  }\n  \\end{xy}\n\n\n\n\\begin{xy}\n\\xymatrix {\n                                             &amp; \\done_3\\ar[d]_D              \\\\\n\\done_j:8k+4\\ar@{.&gt;}[d]^D\\ar@{.&gt;}[r]^U &amp; \\done_2:12k+7\\ar[d]^D   \\\\\n\\done_{j-1}:4k+2\\ar@{.&gt;}[d]^D             &amp; \\done_1:6k+3\\ar[d]^D\\ar@\/^\/[u]^\\mu   \\\\\n\\todo:g=2k\\ar@{.&gt;}[r]^U                   &amp; \\done_0:3k+1\\ar@\/^\/[u]^\\mu\n}\n\\end{xy}\n<\/div>\n\n\n\n<p>On the left hand side diagram, since after \\(\\done_3\\) Jane chose to move <em>up<\/em> to \\(\\done_2\\), \\(4k+2\\) must have been visited at some earlier step \\(\\done_j\\). But there is a contradiction since from \\(\\done_j\\) Jane should have moved <em>down<\/em> to \\(g=\\todo\\).<\/p>\n\n\n\n<p>On the right hand side diagram, since \\(\\done_2\\) has not created a gap (induction hypothesis), \\(8k+5\\) must have been visited at some earlier step \\(\\done_j\\). After  \\(\\done_j\\) Jane must have moved <em>down<\/em> to \\(\\done_{j-1}\\) and from \\(\\done_{j-1}\\) she should have moved <em>down<\/em> to \\(\\todo\\), again a contradiction.<\/p>\n\n\n\n<h4>Subcase: \\(\\rho(i-2) = \\rho(i-1)\\nu\\)<\/h4>\n\n\n\n<p>If \\(\\rho(n-2) = \\rho(n-1)\\nu\\), then one of the two following commutative diagrams holds:<\/p>\n\n\n\n<div class=\"is-content-justification-left is-nowrap is-layout-flex wp-container-38 wp-block-group\">\n\\begin{xy}\n  \\xymatrix {\n  \\bbox[5pt]{ }\\\\\n  \\done_3:8k+5\\ar@{.&gt;}[d]^D\\ar[r]^U  &amp; \\done_2:12k+8\\ar[d]^D   \\\\\n  \\done_j:4k+2\\ar@{.&gt;}[d]^D          &amp; \\done_1:6k+3\\ar[d]^D\\ar@\/^\/[u]^\\nu   \\\\\n  \\todo:g=2k\\ar@{.&gt;}[r]^U            &amp; \\done_0:3k+1\\ar@\/^\/[u]^\\mu\n  }\n  \\end{xy}\n\n\n\n\\begin{xy}\n\\xymatrix {\n                                             &amp; \\done_3\\ar[d]_D              \\\\\n\\done_j:8k+5\\ar@{.&gt;}[d]^D\\ar@{.&gt;}[r]^U &amp; \\done_2:12k+8\\ar[d]^D   \\\\\n\\done_{j-1}:4k+2\\ar@{.&gt;}[d]^D             &amp; \\done_1:6k+3\\ar[d]^D\\ar@\/^\/[u]^\\nu   \\\\\n\\todo:g=2k\\ar@{.&gt;}[r]^U                   &amp; \\done_0:3k+1\\ar@\/^\/[u]^\\mu\n}\n\\end{xy}\n<\/div>\n\n\n\n<p>On the left hand side diagram, since after \\(\\done_3\\) Jane chose to move <em>up<\/em> to \\(\\done_2\\), \\(4k+2\\) must have been visited at some earlier step \\(\\done_j\\). But there is a contradiction since from \\(\\done_j\\) Jane should have moved <em>down<\/em> to \\(g=\\todo\\).<\/p>\n\n\n\n<p>On the right hand side diagram, since \\(\\done_2\\) has not created a gap (induction hypothesis), \\(8k+5\\) must have been visited at some earlier step \\(\\done_j\\). After  \\(\\done_j\\) Jane must have moved <em>down<\/em> to \\(\\done_{j-1}\\) and from \\(\\done_{j-1}\\) she should have moved <em>down<\/em> to \\(\\todo\\), again a contradiction.<\/p>\n\n\n\n<p>At this point, we conclude that it is not possible that  \\(\\rho(n) = 3k+1\\).<\/p>\n\n\n\n<h3>Gap \u00ab\u00a0to the left\u00a0\u00bb of \\(3k + 2\\)<\/h3>\n\n\n\n<p>Consider now the case \\(\\rho(i) = 3k+1\\).<\/p>\n\n\n\n<p>The same reasoning as previously brings contradictions.<\/p>\n\n\n\n<p>If \\(\\rho(i-1) = \\rho(i)\\mu\\), the commutative diagrams to consider are:<\/p>\n\n\n\n<div class=\"is-content-justification-left is-nowrap is-layout-flex wp-container-39 wp-block-group\">\n\\begin{xy}\n\\xymatrix {\n\\bbox[5pt]{ }\\\\\n\\done_2:4k+3\\ar@{.&gt;}[d]^D\\ar[r]^U          &amp; \\done_1:6k+5\\ar[d]^D   \\\\\n\\todo:g=2k+1\\ar@{.&gt;}[r]^U            &amp; \\done_0:3k+2\\ar@\/^\/[u]^\\mu\n}\n\\end{xy}\n\n\n\n\\begin{xy}\n\\xymatrix {\n&amp; \\done_2\\ar[d]_D              \\\\\n\\done_j:4k+3\\ar@{.&gt;}[d]^D\\ar@{.&gt;}[r]^U          &amp; \\done_1:6k+5\\ar[d]^D   \\\\\n\\todo:g=2k+1\\ar@{.&gt;}[r]^U            &amp; \\done_0:3k+2\\ar@\/^\/[u]^\\mu\n}\n\\end{xy}\n<\/div>\n\n\n\n<p>If \\(\\rho(i-1) = \\rho(i)\\nu\\) and \\(\\rho(i-2) = \\rho(n-1)\\mu\\), the commutative diagrams to consider are:<\/p>\n\n\n\n<div class=\"is-content-justification-left is-nowrap is-layout-flex wp-container-40 wp-block-group\">\n\\begin{xy}\n  \\xymatrix {\n  \\bbox[5pt]{ }\\\\\n  \\done_3:8k+8\\ar@{.&gt;}[d]^D\\ar[r]^U  &amp; \\done_2:12k+13\\ar[d]^D   \\\\\n  \\done_j:4k+3\\ar@{.&gt;}[d]^D          &amp; \\done_1:6k+6\\ar[d]^D\\ar@\/^\/[u]^\\mu   \\\\\n  \\todo:g=2k+1\\ar@{.&gt;}[r]^U            &amp; \\done_0:3k+2\\ar@\/^\/[u]^\\nu\n  }\n  \\end{xy}\n\n\n\n\\begin{xy}\n\\xymatrix {\n                                             &amp; \\done_3\\ar[d]_D              \\\\\n\\done_j:8k+8\\ar@{.&gt;}[d]^D\\ar@{.&gt;}[r]^U &amp; \\done_2:12k+13\\ar[d]^D   \\\\\n\\done_{j-1}:4k+3\\ar@{.&gt;}[d]^D             &amp; \\done_1:6k+6\\ar[d]^D\\ar@\/^\/[u]^\\mu   \\\\\n\\todo:g=2k+1\\ar@{.&gt;}[r]^U                   &amp; \\done_0:3k+2\\ar@\/^\/[u]^\\nu\n}\n\\end{xy}\n<\/div>\n\n\n\n<p>If \\(\\rho(i-1) = \\rho(i)\\nu\\) and \\(\\rho(i-2) = \\rho(i-1)\\nu\\), the commutative diagrams to consider are:<\/p>\n\n\n\n<div class=\"is-content-justification-left is-nowrap is-layout-flex wp-container-41 wp-block-group\">\n\\begin{xy}\n  \\xymatrix {\n  \\bbox[5pt]{ }\\\\\n  \\done_3:8k+9\\ar@{.&gt;}[d]^D\\ar[r]^U  &amp; \\done_2:12k+14\\ar[d]^D   \\\\\n  \\done_j:4k+3\\ar@{.&gt;}[d]^D          &amp; \\done_1:6k+6\\ar[d]^D\\ar@\/^\/[u]^\\nu   \\\\\n  \\todo:g=2k+1\\ar@{.&gt;}[r]^U            &amp; \\done_0:3k+2\\ar@\/^\/[u]^\\nu\n  }\n  \\end{xy}\n\n\n\n\\begin{xy}\n\\xymatrix {\n                                             &amp; \\done_3\\ar[d]_D              \\\\\n\\done_j:8k+9\\ar@{.&gt;}[d]^D\\ar@{.&gt;}[r]^U &amp; \\done_2:12k+14\\ar[d]^D   \\\\\n\\done_{j-1}:4k+3\\ar@{.&gt;}[d]^D             &amp; \\done_1:6k+6\\ar[d]^D\\ar@\/^\/[u]^\\nu   \\\\\n\\todo:g=2k+1\\ar@{.&gt;}[r]^U                   &amp; \\done_0:3k+2\\ar@\/^\/[u]^\\nu\n}\n\\end{xy}\n<\/div>\n\n\n\n<p>This concludes the proof that Jane&rsquo;s reluctant recitation never halts. \\(\\qed\\)<\/p>\n\n\n\n<h2>Conjecture 3: Jane&rsquo;s reluctant recitation tells all beads<\/h2>\n\n\n\n<p>We have demonstrated (just above) that Jane&rsquo;s reluctant recitation is a well defined sequence \\((\\rho(n))_{n=0}^\\infty\\). By construction \\(\\rho\\) is injective, but more than that,<\/p>\n\n\n\n<p>\\begin{align}<br>\\mbox{it seems that } \\rho \\mbox { is a permutation of }  \\mathbb{N}.\\label{ReluctantPermutation}<br>\\end{align}<\/p>\n\n\n\n<p>We have been able to check with a computer that \\(\\rho\\) reaches every integer up to \\(7884654\\) (\\(\\approx 7.8\\cdot10^6\\)) but at the moment we cannot prove conjecture 3. We can however prove a lesser form of it, <strong>theorem 3: either Jane&rsquo;s reluctant recitation tells all beads, or there is a finite integer that bounds the number of times it visits every maximal up-chain \\(\\uparrow\\!(3n)\\)<\/strong>.<\/p>\n\n\n\n<h3>Lemma 1<\/h3>\n\n\n\n<p>Let \\(n\\in\\N\\), then the down-chain \\(\\downarrow\\!(n)\\) contains exactly the integers \\(m\\) for which the binary representation of \\(m+1\\) is a prefix of the binary representation of \\(n+1\\):<\/p>\n\n\n\n<p>\\begin{align}<br>&amp;\\forall n, \\quad \\downarrow\\!(n)\\quad=\\quad\\{m\\mid \\exists k\\ge0, m+1 = \\floor{n+1\\over2^k}\\}<br>\\end{align}<\/p>\n\n\n\n<h3>Lemma 2<\/h3>\n\n\n\n<p>Let \\(m\\in\\N\\). There exists a bound \\(b(m)\\ge0\\) such that given any \\(n\\ge0\\), \\(m\\) belongs to the down-chain of a bead less than \\(b(m)\\) up-moves away from \\(n\\):<\/p>\n\n\n\n<p>\\begin{align}<br>&amp;\\forall m\\in\\N, \\exists b\\in\\N,\\quad \\forall n\\in\\N, m\\in\\cup_{k=0}^{b}\\downarrow\\!(nU^k)<br>\\end{align}<\/p>\n\n\n\n<p>The proof requires a short detour via analysis. First observe the following inequalities, true for all \\(n\\gt0\\):<\/p>\n\n\n\n<p>\\begin{align}<br>&amp;\\floor{3n+1\\over2} \\le nU \\le \\floor{3n+2\\over2}\\\\<br>&amp;\\log_2(n)+\\log_2({3\\over2})+\\log_2(1+{1\\over3n}) \\le \\log_2(nU)\\nonumber\\\\<br>&amp;\\qquad\\le \\log_2(n)+\\log_2({3\\over2})+\\log_2(1+{2\\over3n})\\\\<br>&amp;{1\\over\\ln(2)}{1\\over1+3n} \\le \\log_2(1+{1\\over3n}) \\lt \\log_2(1+{2\\over3n}) \\le {1\\over\\ln(2)}{2\\over3n}\\\\<br>&amp;{1\\over\\ln(2)}({2\\over3n}-{1\\over1+3n}) = {1\\over\\ln(2)}{3n+2\\over 3n(3n+1)}<br>\\end{align}<\/p>\n\n\n\n<p>Further observe that since \\(\\log_2(3)\\) is irrational, then:<br>\\begin{align}<br>\\log_2({3\\over2})\\N \\mbox{ is dense in the circle } \\R\/\\Z<br>\\end{align}<\/p>\n\n\n\n<div style=\"position: relative; width: 100%; aspect-ratio: 1\">\n<iframe src=\"https:\/\/douzebis.github.io\/jane-s-rosary\/irrational-log2-3.html?n=40\" style=\"width: 100%; aspect-ratio: 1; border: none\" scrolling=\"no\"><\/iframe>\n<a href=\"https:\/\/douzebis.github.io\/jane-s-rosary\/irrational-log2-3.html?n=40&amp;interactive=yes\">\n<div class=\"overlay\"><\/div><\/a>\n<figcaption id=\"log2-3-is-dense\" style=\"text-align: center\">\\(\\log_2({3\\over2})\\N \\mbox{ is dense in the circle } \\R\/\\Z\\)<\/figcaption>\n<\/div>\n\n\n\n<p>Now let&rsquo;s assume \\(m\\in\\N\\) given, and let \\(d\\) be the number of digits in binary representation of \\(m+1\\): \\(2^d\\le m+1 \\lt 2^{d+1}\\).<\/p>\n\n\n\n<p>Now perform the following:<\/p>\n\n\n\n<ul>\n<li>Choose \\(i\\) such that \\(i\\log_2({3\\over2})\\) is less than \\(1\\over2^{d+1}\\) away from \\(0\\) in \\(\\R\/\\Z\\).<\/li>\n\n\n\n<li>Choose \\(e\\gt d\\) such that \\(i\\log_2({3\\over2})\\) is more than \\(1\\over2^{e+1}\\) away from \\(0\\) in \\(\\R\/\\Z\\).<\/li>\n\n\n\n<li>Choose \\(a\\in\\N\\) such that:<br>\\[\\forall n \\ge a, \\quad {1\\over\\ln(2)}{3n+2\\over 3n(3n+1)} \\lt {1\\over 2^{e+1}i}\\label{plus2}\\]<\/li>\n<\/ul>\n\n\n\n<p>Finally define the bound \\(b(m)\\) as \\(a + 2^{e+1}i\\).<\/p>\n\n\n\n<p>Observe that for all \\(n\\in\\N\\), \\(\\{nU^k\\mid k\\le b\\}\\) must contain a point \\(nU^k\\) that is less than \\(1\\over2^{d+1}\\) away from \\(log_2({\\mu(m)+\\nu(m)\\over2})\\). By lemma 1, it holds that \\(m\\in\\;\\downarrow\\!(nU^k).\\qed\\)<\/p>\n\n\n\n<h3>Proof of theorem 3<\/h3>\n\n\n\n<p>Assume that there is no finite bound on the number of times the reluctant recitation visits maximal up-chains \\(\\uparrow\\!(3n)\\).<\/p>\n\n\n\n<p>Take \\(m\\in\\N\\). By lemma 2, there is a bound \\(b\\) such that \\(\\forall i\\in\\N, m\\in\\cup_{k=0}^{b}\\downarrow\\!(iU^k)\\). By our assumption, we can pick an \\(n\\) such that \\(\\uparrow\\!(3n)\\) is visited more than \\(b\\) times by the reluctant recitation.<\/p>\n\n\n\n<p>Then there is a \\(k\\), such that \\((3n)U^k\\) is visited by the reluctant recitation and \\(m\\in\\;\\downarrow\\!((3n)U^k)\\). This proves that \\(m\\) is visited by the reluctant recitation.<span id='easy-footnote-2-6271' class='easy-footnote-margin-adjust'><\/span><span class='easy-footnote'><a href='https:\/\/blog.douzeb.is\/?p=6271#easy-footnote-bottom-2-6271' title='Since whenever the reluctant recitation visits a bead \\(l\\), it also visits all beads in \\(\\downarrow\\!(l)\\).'><sup>2<\/sup><\/a><\/span>\\(\\qed\\)<\/p>\n\n\n\n<h2>Interlude: for a few names more<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p><strong>Colonnello Mortimer<\/strong>: Che succede ragazzo?<br><strong>Il Monco<\/strong>: No, niente vecchio, non mi tornavano i conti. Ne mancava uno.<\/p>\n<cite>Sergio Leone, Per qualche dollaro in pi\u00f9 (1965)<\/cite><\/blockquote>\n\n\n\n<ul>\n<li><strong>Canonical recitation<\/strong>: the canonical recitation to bead \\(n\\) (denoted \\(\\boldsymbol{C}(n)\\))is the minimal recitation \\(0=a_0, a_1, \\cdots, a_{h(n)} = n\\), defined by:<br>\\begin{align}<br>&amp; 3\\nmid a_i &amp;\\implies a_{i-1} = a_i\\lambda\\nonumber\\\\<br>&amp; 3\\mid a_i \\mbox{ and } \\Lambda(a_i\\mu)\\gt\\Lambda(a_i\\nu) &amp;\\implies a_{i-1} = a_i\\mu\\nonumber\\\\<br>&amp; 3\\mid a_i \\mbox{ and } \\Lambda(a_i\\nu)\\gt\\Lambda(a_i\\mu) &amp;\\implies a_{i-1} = a_i\\nu\\nonumber<br>\\end{align}<\/li>\n\n\n\n<li><strong>Jane&rsquo;s onyx rosary<\/strong>: Jane&rsquo;s onyx rosary is obtained by removing all white beads from Jane&rsquo;s full rosary. A bead in Jane&rsquo;s onyx rosary is called an onyx bead, to distinguish it from the same bead in the Jane&rsquo;s full rosary.<\/li>\n\n\n\n<li><strong>Onyx bead<\/strong>: a bead in Jane&rsquo;s onyx rosary. Onyx beads positions are numbered from \\(0\\). Onyx bead \\(n\\) is the same as (black) bead \\(3n\\) in Jane&rsquo;s full rosary.<\/li>\n\n\n\n<li><strong>Onyx ordering<\/strong>: we define the partial ordering \\(\\b{\\preceq}\\) on the set of onyx beads: given two onyx beads \\(m, n\\in\\mathbb{N}\\),<br>\\[m\\b{\\preceq}n\\iffdef 3m\\mbox{ appears in the canonical recitation for }3n\\] <\/li>\n\n\n\n<li><strong>Onyx height<\/strong>: The onyx height of bead \\(n\\) (denoted \\(\\boldsymbol{h}(n)\\)) is defined as one less than the number of black beads in the canonical recitation of \\(3n\\):<br>\\[\\forall n,\\quad\\b{h}(n)\\quad\\eqdef\\quad\\card{\\boldsymbol{C}(3n)\\cap3\\mathbb{N}}-1\\]<\/li>\n\n\n\n<li><strong>Onyx down<\/strong>: Onyx down on onyx bead \\(n\\) (denoted \\(\\b{D}(n)\\) or \\(n\\boldsymbol{D}\\)) is defined as:<br>\\[\\boldsymbol{D}(n)\\quad\\eqdef\\quad {1\\over3}\\sigma(D(3n))\\]<\/li>\n\n\n\n<li><strong>Onyx mu<\/strong>: Onyx mu on bead \\(n\\) (denoted \\(\\boldsymbol{\\mu}(n)\\) or \\(n\\boldsymbol{\\mu}\\)) is defined as:<br>\\[\\boldsymbol{\\mu}(n)\\quad\\eqdef\\quad {1\\over3}\\sigma(\\mu(3n))\\]<\/li>\n\n\n\n<li><strong>Onyx nu<\/strong>: Onyx nu on bead \\(n\\) (denoted \\(\\boldsymbol{\\nu}(n)\\) or \\(n\\boldsymbol{\\nu}\\)) is defined as:<br>\\[\\boldsymbol{\\nu}(n)\\quad\\eqdef\\quad {1\\over3}\\sigma(\\nu(3n))\\]<\/li>\n<\/ul>\n\n\n\n<h2>Jane&rsquo;s onyx rosary<\/h2>\n\n\n\n<p>Jane&rsquo;s onyx rosary is obtained by removing all white beads from Jane&rsquo;s full rosary. We call a bead in Jane&rsquo;s onyx rosary an <em>onyx bead<\/em>, to distinguish it from the same bead in Jane&rsquo;s full rosary. Beads positions in Jane&rsquo;s onyx rosary are numbered from \\(0\\). In other words, onyx bead \\(n\\) is the same as (black) bead \\(3n\\) in Jane&rsquo;s full rosary.<\/p>\n\n\n\n<p>In this section, we leave the black beads aside and focus solely on onyx beads.<\/p>\n\n\n\n<h3>Onyx ordering<\/h3>\n\n\n\n<p>Given two onyx beads \\(m, n\\in\\mathbb{N}\\), we define the onyx (partial) ordering \\(\\boldsymbol{\\preceq}\\) as:<br>\\[m\\boldsymbol{\\preceq}n\\iffdef 3m\\mbox{ appears in the canonical recitation for }3n\\]<\/p>\n\n\n\n<p>The onyx ordering is a well founded partial order on \\(\\N\\) (i.e., there are no infinitely descending chains). \\(0\\) is its only minimal element.<\/p>\n\n\n\n<p>The Hasse diagram for the onyx partial order is a tree rooted in \\(0\\) (see <a href=\"#onyx-ordering\" data-type=\"internal\" data-id=\"#onyx-ordering\">#onyx-ordering<\/a>). In this tree, every onyx bead \\(n\\) is \\(\\b{h}(n)\\) edges away from \\(0\\).<\/p>\n\n\n\n<div style=\"position: relative; width: 100%; aspect-ratio: 24\/8\">\n<iframe src=\"https:\/\/douzebis.github.io\/jane-s-rosary\/onyx-ordering.html?n=70\" style=\"width: 100%; aspect-ratio: 24\/8; border: none\" scrolling=\"no\"><\/iframe>\n<a href=\"https:\/\/douzebis.github.io\/jane-s-rosary\/onyx-ordering.html?n=1000&amp;interactive=yes\">\n<div class=\"overlay\"><\/div><\/a>\n<figcaption id=\"onyx-ordering\" style=\"text-align: center\">Jane&rsquo;s onyx partial ordering<\/figcaption>\n<\/div>\n\n\n\n<p>In the onyx ordering, every non-zero element \\(n\\) has a unique predecessor \\(p(n)\\), which we denote \\(p(n)\\lessdot n\\).<\/p>\n\n\n\n<p>By construction (and also as can be seen on <a href=\"#onyx-ordering\" data-type=\"internal\" data-id=\"#onyx-ordering\">#onyx-ordering<\/a>),  the onyx ordering is embedded in \\(\\N, \\le\\) in the sense that:<br>\\begin{align}<br>m\\b{\\preceq}n\\quad\\implies\\quad m\\le n<br>\\end{align}<\/p>\n\n\n\n<h3>Theorem 4: every bead in the onyx ordering has infinitely many successors<\/h3>\n\n\n\n<p>Let us first establish a few lemmas that will help proving theorem 4.<\/p>\n\n\n\n<h4>Lemma 3<\/h4>\n\n\n\n<p>The following property holds:<\/p>\n\n\n\n<p>\\begin{align}<br>&amp;\\forall n, k \\in \\N, \\quad 3\\mid nU^{k+1}D \\iff nU^k\\mbox{ and }nU^{k+1}\\mbox{ have the same parity}<br>\\end{align}<\/p>\n\n\n\n<p>The proof is achieved by considering the four cases for the respective parities of \\(nU^k\\) and \\(nU^{k+1}.\\qed\\)<\/p>\n\n\n\n<h4>Lemma 4<\/h4>\n\n\n\n<p>Let \\(n \\in \\N\\), the up-chain \\(\\uparrow\\!(n)\\) starting at \\(n\\) cannot have constant parity:<\/p>\n\n\n\n<p>\\begin{align}<br>&amp;\\forall n \\in \\N, \\quad (nU^k)_{k=0}^\\infty\\mbox{ does not have constant parity}<br>\\end{align}<\/p>\n\n\n\n<p>The proof is by contradiction.<\/p>\n\n\n\n<p>Assume \\((nU^k)_{k=0}^\\infty\\) is constantly even. Then:<br>\\[\\forall k \\in \\N, \\quad nU^{k+1} = {3\\over2}nU^k+1\\]<\/p>\n\n\n\n<p>This equation is solvable and the unique solution is:<br>\\[\\forall k \\in \\N, \\quad nU^k = ({3\\over2})^k(n+2)-2\\]<\/p>\n\n\n\n<p>This is a contradiction since \\(nU^k\\) must be an integer for all \\(k\\).<\/p>\n\n\n\n<p>Conversely, assume \\((nU^k)_{k=0}^\\infty\\) is constantly odd. Then:<br>\\[\\forall k \\in \\N, \\quad nU^{k+1} = {3\\over2}nU^k+{1\\over2}\\]<\/p>\n\n\n\n<p>This equation is solvable and the unique solution is:<br>\\[\\forall k \\in \\N, \\quad nU^k = ({3\\over2})^k(n+1)-1\\]<\/p>\n\n\n\n<p>This is a contradiction since again,  \\(nU^k\\) must be an integer for all \\(k.\\qed\\)<\/p>\n\n\n\n<h4>Lemma 5<\/h4>\n\n\n\n<p>For any \\(S\\subseteq\\N\\) and any \\(n\\in\\N\\), let \\(S+n\\) denote the set \\(\\{k+n\\mid k\\in S\\}.\\)<\/p>\n\n\n\n<p>\\begin{align}<br>&amp;\\forall m, n\\in\\N,\\quad \\uparrow\\!(n)\\;\\cap\\;(\\uparrow\\!(m)+1) \\mbox{ contains at most }2\\mbox{ elements.}\\\\<br>&amp;\\forall m, n\\in\\N,\\quad \\uparrow\\!(n)\\;\\cap\\;(\\uparrow\\!(m)-1) \\mbox{ contains at most }2\\mbox{ elements.}\\nonumber<br>\\end{align}<\/p>\n\n\n\n<h4>Proof of theorem 4<\/h4>\n\n\n\n<p>The proof proceeds with the construction of subsets of (non-onyx) beads \\(S_n\\subseteq\\;\\uparrow\\!(n)\\) for all \\(n\\in\\N\\). \\(S_n\\) is defined as:<\/p>\n\n\n\n<p>\\begin{align}<br>&amp;S_n = \\{k\\in\\;\\uparrow\\!(3n)\\;\\mid\\; 3\\mid kD\\}<br>\\end{align}<\/p>\n\n\n\n<p>By lemma 3 and lemma 4 we know that \\(S_n\\) is infinite.<\/p>\n\n\n\n<p>Let \\(D(S_n)\\), \\(D\\mu(S_n)\\), \\(D\\nu(S_n)\\) respectively denote the sets \\(\\{kD \\mid k\\in S_n\\}\\), \\(\\{kD\\mu \\mid k\\in S_n\\}\\), and \\(\\{kD\\nu \\mid k\\in S_n\\}.\\)<\/p>\n\n\n\n<p>Now consider \\(m\\lt n\\in\\N\\).<\/p>\n\n\n\n<ul>\n<li>It holds that \\((D\\mu(S_m)\\cup D\\nu(S_m))\\setminus S_m \\;\\subseteq\\; (S_m+1)\\cup(S_m-1)\\).<\/li>\n\n\n\n<li>Thus by lemma 5, \\((D\\mu(S_m)\\cup D\\nu(S_m))\\cap S_n\\) contains at most \\(4\\) elements.<\/li>\n<\/ul>\n\n\n\n<p>To conclude, consider \\(n\\in\\N\\) and \\(P_{3n}=S_{3n}\\setminus\\cup_{k\\lt n}(D\\mu(S_{3k})\\cup D\\nu(S_{3k}))\\).<\/p>\n\n\n\n<ul>\n<li>\\(P_{3n}\\) has infinitely many elements,<\/li>\n\n\n\n<li>For each \\(k\\in P_{3n}\\), \\(3\\mid kD\\), say \\(kD = 3m\\),<\/li>\n\n\n\n<li>k is the lower of \\(kD\\mu\\) and \\(kD\\nu\\).<\/li>\n<\/ul>\n\n\n\n<p>This designates \\(3m\\) as the immediate predecessor of \\(kD\\) in the canonical recitation to \\(kD\\). In other words, \\(m\\) (as an onyx bead) is the (immediate) predecessor of \\(n\\) in the onyx ordering: \\(m \\lessdot n.\\qed\\)<\/p>\n\n\n\n<h3>Corollary of theorem 4: canonical onyx mapping<\/h3>\n\n\n\n<p>Given any onyx bead \\(n\\in\\N\\) and \\(k\\in\\N\\), let \\(\\b{s}_n(k)\\) denote the \\(k\\)<sup>th<\/sup> cover of \\(n\\) in the onyx ordering (i.e. immediate successor), where the covers are ordered by \\(\\leq\\).<\/p>\n\n\n\n<p>Conversely, given a non-zero onyx bead \\(n\\in\\N^*\\), let \\(\\b{\\pi}(n)\\) denote the unique predecessor of \\(n\\) in the onyx ordering, and let \\(\\b{\\iota}(n)\\) denote the position of \\(n\\) in the set of covers of \\(\\b{\\pi}(n)\\).<\/p>\n\n\n\n<p>For instance (refer to <a href=\"#onyx-ordering\" data-type=\"internal\" data-id=\"#onyx-ordering\">#onyx-ordering<\/a>): \\(\\b{s}_0(2)=10\\), \\(\\b{s}_1(2)=5\\), \\(\\b{\\iota}(38)=3\\).<\/p>\n\n\n\n<p>We define the canonical onyx mapping \\(C\\) as:<\/p>\n\n\n\n<p>\\begin{align}<br>C:\\;&amp;\\N\\rightarrow\\N^{\\lt\\omega}\\nonumber\\\\<br>&amp;n\\mapsto(\\b{\\iota}(\\b{\\pi}^i(n)))_{i\\lt \\b{h}(n)}\\nonumber<br>\\end{align}<\/p>\n\n\n\n<p>\\(C\\) is a one-to-one mapping from \\(\\N\\) to the set \\(\\N^{\\lt\\omega}\\) of finite sequences of natural numbers. Furthermore:<\/p>\n\n\n\n<p>\\begin{align}<br>&amp;\\forall m, n\\in\\N, \\quad m\\preceq n\\iff C(m) \\mbox{ is a prefix of } C(n).<br>\\end{align}<\/p>\n\n\n\n<p>As an illustration, the following table gives \\(C_n\\) for \\(n=0\\cdots10\\):<br>\\[\\begin{array}{c|c}<br>  n &amp; C(n)\\\\<br>\\hline<br>0 &amp; ()\\\\<br>1 &amp; (0)\\\\<br>2 &amp; (0, 0)\\\\<br>3 &amp; (1, 0)\\\\<br>4 &amp; (1)\\\\<br>5 &amp; (2, 0)\\\\<br>6 &amp; (0, 0, 0)\\\\<br>7 &amp; (0, 1)\\\\<br>8 &amp; (0, 0, 1)\\\\<br>9 &amp; (0, 0, 0, 1)\\\\<br>10 &amp; (2)<br>\\end{array}\\]<\/p>\n\n\n\n<h2>Work in progress<\/h2>\n\n\n\n<h3>Jane&rsquo;s onyx height sequence<\/h3>\n\n\n\n<h3>Jane&rsquo;s onyx reluctant sequence<\/h3>\n\n\n\n<h3>Jane&rsquo;s inverse onyx reluctant sequence<\/h3>\n\n\n\n<h3>Jane&rsquo;s foraging sequence<\/h3>\n\n\n\n<p>Jane&rsquo;s foraging sequence \\((\\boldsymbol{\\Phi}(i))_{i=0}^\\infty)\\) is a sequence of onyx beads constructed from Jane&rsquo;s reluctant recitation in the following way:<\/p>\n\n\n\n<ul>\n<li>each \\(\\rho(i)\\) is replaced with \\(\\sigma(\\rho(i))\\over3\\),<\/li>\n\n\n\n<li>then direct repetitions are removed.<\/li>\n<\/ul>\n\n\n\n<p>The foraging sequence goes like this:<\/p>\n\n\n\n<p>\\[0, 1, 2, 4, 3, 13, 4, 7, 5, 0, 10, 40, 30, 4, 11, 8, 6, 16, 12, 9,\\cdots\\]<\/p>\n\n\n\n<p>The foraging sequence is infinite. If conjecture \\(3\\) is true, then the foraging sequence visits all natural numbers an infinite number of times.<\/p>\n\n\n\n<p>The following algorithm computes \\(\\boldsymbol{\\Phi}(i)\\):<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block custom_code_mirror\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;zenburn&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;className&quot;:&quot;custom_code_mirror&quot;,&quot;language&quot;:&quot;Python&quot;,&quot;modeName&quot;:&quot;python&quot;}\">def Phi(n: int) -&gt; int:\n    import itertools\n    if n &lt; 0: raise Exception(&quot;argument must be nonnegative&quot;)\n    visited = {0: 0}\n    bead = 1\n    res = 0\n    for i in itertools.count(1):\n        if n == 0: return res\n        visited[bead] = i\n        label = 1 + bead\/\/2\n        if not bead - label in visited:\n            bead -= label  # moving down\n        else:\n            bead += label  # moving up\n        nxt = bead\n        while nxt%3: nxt = (2*nxt)\/\/3  # compute seed\n        nxt = nxt\/\/3\n        if nxt != res:\n            res = nxt\n            n -= 1<\/pre><\/div>\n\n\n\n<h2>References<\/h2>\n\n\n\n\n<div id='zp-InTextBib-zotpress-b5ea6263cdb793640e2065159c5d95c7' class='zp-Zotpress zp-Zotpress-InTextBib wp-block-group zp-Post-6271'>\r\n\t\t<span class=\"ZP_ITEM_KEY\" style=\"display: none;\">{6833562:7U8SN6JE}<\/span>\r\n\t\t<span class=\"ZP_STYLE\" style=\"display: none;\">apa<\/span>\r\n\t\t<span class=\"ZP_SORTBY\" style=\"display: none;\">default<\/span>\r\n\t\t<span class=\"ZP_ORDER\" style=\"display: none;\">asc<\/span>\r\n\t\t<span class=\"ZP_TITLE\" style=\"display: none;\">no<\/span>\r\n\t\t<span class=\"ZP_SHOWIMAGE\" style=\"display: none;\"><\/span>\r\n\t\t<span class=\"ZP_SHOWTAGS\" style=\"display: none;\"><\/span>\r\n\t\t<span class=\"ZP_DOWNLOADABLE\" style=\"display: none;\"><\/span>\r\n\t\t<span class=\"ZP_NOTES\" style=\"display: none;\"><\/span>\r\n\t\t<span class=\"ZP_ABSTRACT\" style=\"display: none;\"><\/span>\r\n\t\t<span class=\"ZP_CITEABLE\" style=\"display: none;\"><\/span>\r\n\t\t<span class=\"ZP_TARGET\" style=\"display: none;\"><\/span>\r\n\t\t<span class=\"ZP_URLWRAP\" style=\"display: none;\"><\/span>\r\n\t\t<span class=\"ZP_FORCENUM\" style=\"display: none;\"><\/span>\r\n\t\t<span class=\"ZP_HIGHLIGHT\" style=\"display: none;\"><\/span>\r\n\t\t<span class=\"ZP_POSTID\" style=\"display: none;\">6271<\/span><div class='zp-List loading'>\n<div class=\"zp-SEO-Content\"><div id=\"zp-ID-6271-6833562-7U8SN6JE\" class=\"zp-Entry zpSearchResultsItem\"><div class=\"csl-bib-body\" style=\"line-height: 2; padding-left: 1em; text-indent:-1em;\">\n  <div class=\"csl-entry\">Caruso, X. (2012). Application des fractions continues &#xE0; la construction des gammes musicales. <i>Revue Des Math&#xE9;matiques de l&#x2019;Enseignement Sup&#xE9;rieur<\/i>, <i>123<\/i>(1), 11.<\/div>\n<\/div><\/div><\/div><!-- .zp-zp-SEO-Content -->\n<\/div><!-- .zp-List --><\/div><!--.zp-Zotpress-->\n\n\n","protected":false},"excerpt":{"rendered":"<p>This mathematical treat was inspired by Jane Street&lsquo;s puzzle: Traversing the Infinite Sidewalk. I shared the puzzle with my mathematical friend \u00c9ric, and we had quite some fun discovering its properties. It is also a testimony to the richness derived from the irrationality of \\(\\log_2(3)\\) and reminiscent of about the mathematics underlying the 12-tone Pythagorean [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4341,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[16,19],"tags":[],"ppma_author":[76],"authors":[{"term_id":76,"user_id":1,"is_guest":0,"slug":"fred","display_name":"Fred","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/ec0326d654fdf9f66e9eb42bb34a9bc4?s=96&d=mm&r=g","description":"","first_name":"","last_name":"","user_url":""}],"_links":{"self":[{"href":"https:\/\/blog.douzeb.is\/index.php?rest_route=\/wp\/v2\/posts\/6271"}],"collection":[{"href":"https:\/\/blog.douzeb.is\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.douzeb.is\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.douzeb.is\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.douzeb.is\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6271"}],"version-history":[{"count":4,"href":"https:\/\/blog.douzeb.is\/index.php?rest_route=\/wp\/v2\/posts\/6271\/revisions"}],"predecessor-version":[{"id":6278,"href":"https:\/\/blog.douzeb.is\/index.php?rest_route=\/wp\/v2\/posts\/6271\/revisions\/6278"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.douzeb.is\/index.php?rest_route=\/wp\/v2\/media\/4341"}],"wp:attachment":[{"href":"https:\/\/blog.douzeb.is\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6271"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.douzeb.is\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6271"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.douzeb.is\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6271"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blog.douzeb.is\/index.php?rest_route=%2Fwp%2Fv2%2Fppma_author&post=6271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}