A different way of looking at the Collatz function

Here’s a small thing related to the Collatz function that I found and haven’t heard anyone mention before. Consider the sequence

(1, -1, 2, -2, 3, -3, 4, -4, …).

There’s an interesting algorithm one can do on this sequence:
Step 1: Pick any number n in the sequence.
Step 2: Starting from that number n, move n entries to the right if n is positive, otherwise move -n entries to the left if n is negative. Call this new number m
Step 3: repeat step 2, replacing n with m.

As an example, start with -3. Following the algorithm,
-3 \rightarrow 2 \rightarrow 3 \rightarrow -4 \rightarrow -2 \rightarrow -1 \rightarrow 1 \rightarrow -1 \rightarrow 1 \rightarrow...

It seems that any starting number will eventually end up cycling between 1 and -1. This observation is actually the exact same problem as the Collatz conjecture, and it isn’t hard to show repeating this algorithm indefinitely on any start number is equivalent to iterating a corresponding number under the Collatz function.

This probably has been found before, but I haven’t seen it anywhere so I thought I’d share it, though it’s probably not much more useful than the original problem. However, this sequence has the nice property in that if we have any loop under repeating the algorithm, the sum of the numbers belonging to the loop is zero.

4 Likes

I haven’t seen that anywhere either, and I think I see how that’s the same problem.

I get you.

Your list is: 1, -1, 2, -2, 3, -3, 4, -4, …

To simulate 7’s Collatz trajectory, start with the 7th number on your list, which is 4. This takes you to the 11th number on your list, which is 6 … which takes you to the 17th number, which is 9 … which takes you to the 26th number, which is -13 …

So the familiar trajectory 7-11-17-26-… is traced out by the sequence of positions reached in your list.

Nice!

1 Like

It’s fascinating !!! You could also represent this list by the distance between a number to the next. I’ve been working on that, and it seems I can apply my model with yours. As my english is still poor, I got assited by llc to form the answer.

A distance-to-next encoding that matches the (r^-,y^-,\mathrm{med},y^+,r^+) window

For each n\ge 1, define:
(r^-,\,y^-,\,\mathrm{med},\,y^+,\,r^+) = (2n-1,\,3n-1,\,3n,\,3n+1,\,4n+1).

Five-point window (r^-, y^-, med, y^+, r^+) with
(r^-, y^-, med, y^+, r^+) = (2n-1, 3n-1, 3n, 3n+1, 4n+1)

n r- y- med y+ r+
1 1 2 3 4 5
2 3 5 6 7 9
3 5 8 9 10 13
4 7 11 12 13 17
5 9 14 15 16 21
6 11 17 18 19 25
7 13 20 21 22 29
8 15 23 24 25 33
9 17 26 27 28 37
10 19 29 30 31 41
11 21 32 33 34 45
12 23 35 36 37 49

One odd-only step sends the roots to their links:
3r^-+1=3(2n-1)+1=2(3n-1)\ \Rightarrow\ r^-\to y^-,
3r^+ +1=3(4n+1)+1=4(3n+1)\ \Rightarrow\ r^+\to y^+.

Signed “distance-to-next” picks a side:
d\,n\ \mapsto\ (r,l)=(2n-1,\ 3n-1),
d(-n)\ \mapsto\ (r,l)=(4n+1,\ 3n+1).

Examples:
d1\Rightarrow(1,2), d(-1)\Rightarrow(5,4),
d2\Rightarrow(3,5), d(-2)\Rightarrow(9,7),
d3\Rightarrow(5,8), d(-3)\Rightarrow(13,10),
d4\Rightarrow(7,11), d(-4)\Rightarrow(17,13).

n (−) (r,l) (+) (r,l)
1 (1, 2) (5, 4)
2 (3, 5) (9, 7)
3 (5, 8) (13, 10)
4 (7, 11) (17, 13)
5 (9, 14) (21, 16)
6 (11, 17) (25, 19)
7 (13, 20) (29, 22)
8 (15, 23) (33, 25)
9 (17, 26) (37, 28)
10 (19, 29) (41, 31)
11 (21, 32) (45, 34)
12 (23, 35) (49, 37)

We could also use the odd-only:
T(y)=\frac{3y+1}{2^{\nu_2(3y+1)}} and \mathrm{oddize}(m)=\frac{m}{2^{\nu_2(m)}}.
Then:
(r^-,\,Y^-)=(2n-1,\ \mathrm{oddize}(3n-1)),
(r^+,\,Y^+)=(4n+1,\ \mathrm{oddize}(3n+1)).

Sequence-walk ↔ Collatz (and the (r^-,y^-,\mathrm{med},y^+,r^+) window)

Let s(1),s(2),s(3),\dots=(1,-1,2,-2,3,-3,\dots).
Define the index map F(i)=i+s(i) (move right by s(i) if s(i)>0, left if s(i)<0).

Index/value dictionary:

  • s(2n-1)=+n and s(2n)=-n.
  • So from +n (at index 2n-1) you jump to index 3n-1.
  • From -n (at index 2n) you jump to index n.

Now group indices by the “distance” D=n into a 5-point window

(r^-,\,y^-,\,\mathrm{med},\,y^+,\,r^+) =(2n-1,\,3n-1,\,3n,\,3n+1,\,4n+1).

Two key identities (checked from the definition of F):

F(2n-1)=3n-1,\qquad F^2(4n+1)=3n+1.

These are exactly the Collatz-compressed left/right links:

3r^-+1=2\,y^- \quad(\nu_2=1),\qquad 3r^+ +1=4\,y^+ \quad(\nu_2=2).

In words: starting on the left root r^-=2n-1, one F-move lands on y^-=3n-1;
starting on the right root r^+=4n+1, two F-moves land on y^+=3n+1.

More generally, for any odd index u let k=\nu_2(3u+1). Then

\boxed{\,F^{\,k}(u)=\frac{3u+1}{2^{k}}\,}

(i.e., k steps of the walk perform exactly one odd-only Collatz step on u).
This subsumes both cases above: if u=2n-1 then k=1; if u=4n+1 then k\ge2 and
the first two steps give 3n+1, with extra steps if \nu_2(3n+1)>1.

So the “walk” on (1,-1,2,-2,\dots) is literally Collatz on odd indices,
read in the (r^-,y^-,\mathrm{med},y^+,r^+) windows:

  • Left branch: r^-(2n\!-\!1)\xrightarrow{F} y^-(3n\!-\!1).
  • Right branch: r^+(4n\!+\!1)\xrightarrow{F,F} y^+(3n\!+\!1).
  • The middle anchor is \mathrm{med}=3n (first multiple of 3 in the window).

Small check with the example in the thread (starting at -3):
-3 sits at index 6. The walk is 6\to3\to5\to8\to4\to2\to1\to2\to1\to\cdots,
i.e. it falls into the 1\leftrightarrow2 index loop, whose values are +1 and -1,
matching the observed (1,-1) cycle.

If you consider each arrow an odd number starting at 1,3,5… this is how they move from one odd to the next, note the 3 distinct patterns.if checking the pattern holds, note that arrows in sequence position 3 mod4 account for reductions via even numbers that if (x-1)÷3 produce the odd integer represented by the arrow

This representation offers new way to look at the same things, but we got ourselves the same problems as to conclude no cycle. Well, at least I couldn’t conclude that :wink:

I won’t go back deeply to how this tape is related to Collatz (see original post, and previous answers).

Setup (the tape)

  • Values: (1,-1,2,-2,3,-3,\ldots).
  • Index map: F(i)=i+s(i) with s(2n-1)=+n and s(2n)=-n.
  • Odd-only shortcut: for odd u and k=\nu_2(3u+1),
    F^{\,k}(u)=\frac{3u+1}{2^{k}} \;=:\; T(u).
    So walking on the tape equals iterating T on odd positives if you compress k tape steps into one T step.

One-step value rule (four cases)

For m\ge1:
\begin{aligned} &\text{(+ even)}\quad +2m \;\mapsto\; +3m &&(\times\tfrac32),\\ &\text{(+ odd)}\quad +(2m-1) \;\mapsto\; -(3m-2),\\ &\text{(− even)}\quad -2m \;\mapsto\; -m &&(\div 2),\\ &\text{(− odd)}\quad -(2m-1) \;\mapsto\; +m. \end{aligned}

I created 4 tables to illustrate this.

  1. Positive even table
    Basic idea : every positive even term ends up to an positive odd term at some point.

    Even positive table
    Indices Bloc 1 Start Bloc 1 End Bloc 2 Start Bloc 2 End Bloc 3 Start Bloc 3 End Bloc 4 Start Bloc 4 End
    1 2 3 4 6 8 12 16 24
    3 6 9 12 18 24 36 48 72
    5 10 15 20 30 40 60 80 120
    7 14 21 28 42 56 84 112 168
    9 18 27 36 54 72 108 144 216
    11 22 33 44 66 88 132 176 264
    13 26 39 52 78 104 156 208 312
    15 30 45 60 90 120 180 240 360
    17 34 51 68 102 136 204 272 408
    19 38 57 76 114 152 228 304 456
    21 42 63 84 126 168 252 336 504
    23 46 69 92 138 184 276 368 552
    25 50 75 100 150 200 300 400 600
    27 54 81 108 162 216 324 432 648
    29 58 87 116 174 232 348 464 696
    31 62 93 124 186 248 372 496 744
    33 66 99 132 198 264 396 528 792
    35 70 105 140 210 280 420 560 840
    37 74 111 148 222 296 444 592 888

    Block decomposition for evens

    • Block j: all evens y=2^{j}r with r odd (j\ge1).

    • Single (+\text{ even}) step:
      (\text{Block }j,\ \text{row }r)\ \mapsto\ (\text{Block }j-1,\ \text{row }3r).

      • Exemple : Block view (evens +): start at y=32=2^5\cdot1:
        (5,1)\to(4,3)\to(3,9)\to(2,27)\to(1,81)\to \text{odd }243,
        i.e. 32\to48\to72\to108\to162\to243 (each (+\text{ even}) step eats one factor 2 and triples the row).
    • After exactly j such steps from y=2^j r you land on the positive odd 3^{j}r.

    • Consequence: “even \to even” is a DAG — \nu_2 strictly drops by 1 on each such edge.

      Which Block-1 evens have an even parent?

    • Among evens \equiv 2\pmod4, precisely those y\equiv 6\pmod{12} come from an even:
      y=12k+6 \Longleftrightarrow x=\tfrac23 y=8k+4\equiv 4\pmod 8.

    • In general (Block j): y=2^j r has an even parent \Leftrightarrow 3\mid r (equivalently r\equiv 3\pmod6), and then the unique parent is x=(2/3)\,y=2^{j+1}(r/3).

  2. Even negative value
    Basic idea : we just devide by 2 up to the point where we get a negative odd term.

    Even negative table
    Indices Bloc 1 Start Bloc 1 End Bloc 2 Start Bloc 2 End Bloc 3 Start Bloc 3 End Bloc 4 Start Bloc 4 End
    -1 -2 -1 -4 -2 -8 -4 -16 -8
    -3 -6 -3 -12 -6 -24 -12 -48 -24
    -5 -10 -5 -20 -10 -40 -20 -80 -40
    -7 -14 -7 -28 -14 -56 -28 -112 -56
    -9 -18 -9 -36 -18 -72 -36 -144 -72
    -11 -22 -11 -44 -22 -88 -44 -176 -88
    -13 -26 -13 -52 -26 -104 -52 -208 -104
    -15 -30 -15 -60 -30 -120 -60 -240 -120
    -17 -34 -17 -68 -34 -136 -68 -272 -136
    -19 -38 -19 -76 -38 -152 -76 -304 -152
    -21 -42 -21 -84 -42 -168 -84 -336 -168
    -23 -46 -23 -92 -46 -184 -92 -368 -184
    -25 -50 -25 -100 -50 -200 -100 -400 -200
    -27 -54 -27 -108 -54 -216 -108 -432 -216
    -29 -58 -29 -116 -58 -232 -116 -464 -232
    -31 -62 -31 -124 -62 -248 -124 -496 -248
    -33 -66 -33 -132 -66 -264 -132 -528 -264

    Positive and negative values do not communcate with each over.

  3. Unique attachments for “easy” odds

    Odd positive values
    Start at End at Ratio
    1 -1 -1
    3 -4 -1.333333333
    5 -7 -1.4
    7 -10 -1.428571429
    9 -13 -1.444444444
    11 -16 -1.454545455
    13 -19 -1.461538462
    15 -22 -1.466666667
    17 -25 -1.470588235
    19 -28 -1.473684211
    21 -31 -1.476190476
    23 -34 -1.47826087
    25 -37 -1.48
    27 -40 -1.481481481
    29 -43 -1.482758621
    31 -46 -1.483870968
    33 -49 -1.484848485
    35 -52 -1.485714286
    37 -55 -1.486486486
    39 -58 -1.487179487
    41 -61 -1.487804878
    43 -64 -1.488372093
    45 -67 -1.488888889
    47 -70 -1.489361702
    49 -73 -1.489795918
    51 -76 -1.490196078
    Odd negative values
    Start at End at Ratio
    -1 1 -1
    -3 2 -0.666666667
    -5 3 -0.6
    -7 4 -0.571428571
    -9 5 -0.555555556
    -11 6 -0.545454545
    -13 7 -0.538461538
    -15 8 -0.533333333
    -17 9 -0.529411765
    -19 10 -0.526315789
    -21 11 -0.523809524
    -23 12 -0.52173913
    -25 13 -0.52
    -27 14 -0.518518519
    -29 15 -0.517241379
    -31 16 -0.516129032
    -33 17 -0.515151515
    -35 18 -0.514285714
    -37 19 -0.513513514
    -39 20 -0.512820513
    -41 21 -0.512195122
    -43 22 -0.511627907
    -45 23 -0.511111111
    -47 24 -0.510638298
    -49 25 -0.510204082
    -51 26 -0.509803922
    -53 27 -0.509433962
    -55 28 -0.509090909
    -57 29 -0.50877193
    -59 30 -0.508474576
    -61 31 -0.508196721
    -63 32 -0.507936508
    -65 33 -0.507692308
    -67 34 -0.507462687
    -69 35 -0.507246377

Other observation

  • Every negative odd -r (with r odd) has the unique even parent -2r (one step).
  • Every positive odd multiple of 3, y=3r, has the unique even parent 2r (one step).

Five-point window per distance n

(r^-,\,y^-,\,\mathrm{med},\,y^+,\,r^+) =\bigl(2n-1,\;3n-1,\;3n,\;3n+1,\;4n+1\bigr).
They satisfy 3r^-+1=2y^- and 3r^+ +1 = 4y^+ (left link in one compressed step, right link typically in two). This can be transpose to the tape (y^--r^- = +d, y^+-r^+ = -d).

Modular facts for positive odds (2-adic recharge k=\nu_2(3y+1))

\begin{aligned} y &\equiv 1 \pmod{8} &&\Rightarrow&& k \ge 2,\\ y &\equiv 5 \pmod{8} &&\Rightarrow&& k \ge 4,\\ y &\equiv 3 \text{ or } 7 \pmod{8} &&\Rightarrow&& k = 1. \end{aligned}

Using the reductions above, any nontrivial cycle (if it existed) must lie among positive odds y\equiv 1,5\pmod 6, where these mod-8 constraints force frequent large k.

grille_chaines_merges

A “distance-grid” ribbon view of odd-only Collatz blocks (merging rows by exact seams)

What the picture shows (how to read it)

  • The grid is organized in rows r = 1,2,3,… For row r set L = r − 1 (the row “length”).
  • Each row has:
    • a left offset of S(L) = 2L − 1 empty slots (shown as dashes),
    • then L boxes (distances −L,…,−1),
    • a pivot of width 2 (two thicker boxes),
    • then L boxes (distances +1,…,+L).
  • We name: start S(L) = 2L − 1, left pivot M(L) = 3L − 1, right pivot m(L) = 3L, end E(L) = 4L + 1.

Exact seam and merging rule (what the colors/ribbons mean)

  • There is a simple exact alignment:
    E(L_1)=S(L_2)\ \Longleftrightarrow\ L_2=2L_1+1\ \Longleftrightarrow\ r_2=2r_1.
    In words: the end of row r lines up with the start of row 2r at the same column.
  • In the SVG I “merge” rows connected by this seam into a single ribbon: a thick horizontal segment across each row, plus a vertical connector at the seam (same x, different r).
  • Each ribbon therefore starts at an odd row r (no predecessor under doubling) and continues r\to 2r\to 4r\to \cdots as long as it stays in frame.

We can merge the lines sequence like this (sry, tried to do a svg but it was hard…).

AI suggestions when generating the svg

Why this is Collatz-relevant (the odd-only block view)

  • For an odd y, let k=\nu_2(3y+1). The even phase (3y+1)/2,(3y+1)/4,\dots that leads to the next odd T(y) is exactly what the right half of a row encodes (after the pivot): the sequence of halving steps down to T(y).
  • The well-known “missing first even” (for odd y, 3y+1 is divisible by 4) manifests here as the pivot’s fixed width 2. The first even is “swallowed” by the pivot; only the subsequent evens appear to the right.

A simple potential that forbids cycles in the merged graph

  • Give every grid position a potential \Phi= its column index x.
  • Any horizontal move within a row increases \Phi by +1.
  • Any vertical seam keeps \Phi unchanged (same column).
  • Hence every directed path in the merged graph has non-decreasing \Phi, and any path that contains a horizontal step strictly increases \Phi.
    ⇒ A directed cycle would need total \Delta\Phi=0 but has \Delta\Phi>0, contradiction. The merged graph is a DAG (acyclic).

Takeaway / intent

  • This is a visual, combinatorial model of the odd-only Collatz evolution via distance tiles and exact seams.
  • The “ribbons” expose a clear time arrow (monotone column index), matching that odd-only steps consume a block of divisions by 2 and move you forward.
  • It’s not a proof of Collatz by itself, but it gives a tidy Lyapunov-style orientation on the merged structure—useful for formal certificates (e.g., min–mean or windowed potentials) and for reasoning about why cycles shouldn’t appear.

Open questions

  1. Can we formalize a complete simulation: every odd-only step corresponds to a monotone path in this merged grid?
  2. Do additional exact seams (e.g., pivot-to-start / pivot-to-end congruences) strengthen the orientation without ever decreasing \Phi?
  3. Can this be turned into a compact automaton certificate (coverage + strictly positive mean weight) using \Phi or a lexicographic potential?
1 Like