√7 is missing – and it took 2000 years to find the real reason why

√7 is missing – and it took 2000 years to find the real reason why

I know that this video is not directly related to Collatz but I thought I'd post a link to it anyway because it is about mod 4 and mod 8 arithmetic and mod 8 arithmetic does have a lot of relevance to Collatz (without claiming that it is the whole story - it is not)

Of relevance is the key result that numbers of the form 4^a.(8b+7) cannot be expressed as a sum of three squares. If we restrict ourselves to odd numbers, then all odd numbers that can be expressed as (8b+7) cannot be expressed as a sum of 3 squares and all other odd numbers can be.

So, these odd numbers that admit a partitioning as a sum of 3 squares can expressed generically as:

8t+r = 8t+2s+3 = a^2+b^2+c^2 , where r=3+2s and s is in {-1,0,1}

If we subtract 3 from each side we get:

8t+2s = 2(4t+s) = (a-1)(a+1) + (b-1)(b+1) + (c-1)(c+1)

The LHS is divisible by 8 iff s = 0 and also (I think) iff a,b,c are all odd

Now, I haven't found any implications of this identity that is useful for Collatz, but I thought I would throw it out there anyway, just in case it piques someone else's interest or curiosity.

youtube.com
u/jonseymourau — 6 days ago

A curious pattern in the distribution of Collatz 3-leaves

update: Oops, there was a bug iin my walk_back code (highlighted)! Neither of the findings are true once that is fixed.

You can find a correction for the image here: https://jonseymour.s3.us-east-1.amazonaws.com/collatz/misc/corrected-leaf-table.png

~~I was playing around with the distribution of leaves in each 2~~~~^(k) window to see there were any interesting patterns and noticed a pattern that appears to be true, although I don't know why it is.

First some definitions. The greedy reverse walk takes the first step backwards from each odd until it reaches a multiple of 3. So that means it calculates both (2n-1)/3 and (4n-1)/3 and takes which ever one is an integer. The resulting multiples of 3 so found are the 3-leaves of the starting nodes.

~~For each power of 2, I enumerate all odds < 2~~~~^(k,) work out what the 3-leaves are and tabulate, the k value, the number of 3-leaves reached by the startting set and the ratio of the # 3-leaves to the number of odds and also the maximum 3-leaf found.

This produced some interesting results:

  • ~~every odd < 2~~~~^(k) ~~resolves to a 3-leaf < 2~~~~^(k) - (A)
  • ~~the ratio of 3-leaves to odds in each 2~~~~^(k) range approaches 4/9 - (B)

Now, it is possible that I am missing something obvious but it isn't immediately apparent to me that either (A) or (B) should be true. I also don't know whether this pattern is true in general - it is just what I have observed.

Here is the Python I used to generate the table in the image

import pandas as pd
import sympy as sy

def walk_back(n):
    if n % 3 == 0 or n == 1:
        return n
    
# bogus!    
##    if (n - 1) % 3 == 0:
##        return walk_back((n-1)//3)
    if (n * 2 - 1) % 3 == 0:
        return walk_back((n * 2 - 1)//3)
    else:
        return walk_back((n * 4 - 1)//3)
        
        
def leaves(k):
    v=set()
    for n in range(1, 2**k, 2):
        l = walk_back(n)
        if l != 1:
            v.add(l)
    return v

def gen(seq):
    for k in seq:
        L=leaves(k)
        n=len(L)
        _max=max(L)
        yield {"k": k, "n": n, "r": sy.Rational(2*n,(2**k)), "max": _max}

df=pd.DataFrame(gen(range(2,24)))
df["r"]=df["r"].apply(lambda r: float(r))
u/jonseymourau — 16 days ago

The Symmerties of the 2^k Collatz State Machine

In yesterday's post, I posted a link to a visualiser for M=2^k Collatz State machines.

If you didn't click through you may not have seen how fascinating the symmetries are so I have taken some screen captures so that you can browse without committing to clicking through the link.

For each screen capture, I selected opposing red (5 mod 8) points. You will notice that each pair of points reveals a different symmetry. Sometimes the symmetries partition a target set of points with one colour into different subsets. In other cases, there is one set of two colours in one selection and the opposite set in the other selection.

Here is a direct link the k=7 (M=128) state machine.

u/jonseymourau — 22 days ago

Notes on 2^k state machines and the "tape machine model"

I did some "thinking in public" in comments of an earlier post and I wanted to consolidate what my current thinking is with this post.

The insight detailed below is that you can always represent an individual Collatz path as a state machine with M states, provided M=2^k is greater than the odd peak of the path - this is simply because in this case the odd residues mod M are simply the Collatz terms themselves and they will never wrap.

You can even use fewer states, provided you resync at each 5 mod 8 node and provided the modulus, M, you chose doesn't induce any obstructions (here denoted H) which imply that M is too small.

I should make clear that FSM result here isn't particularly useful for solving Collatz. The reasons are multiple:

- to derive the sufficient FSM, you need to have calculated the odd peak of the full Collatz orbit
- to derive the reduced FSM, you then need to test each term according to a proposed reduced M to see if reduction is possible

Another way of thinking of it is as N deterministic state machines, driven only by source residues, connected by the 5 mod 8 nodes that join them.

This work doesn't help to show that every 5 mod 8 node is connected to another 5 mod 8 node that indirectly connects to 1 which is ultimately what is required to prove Collatz.

But, i think it does help to illustrate how far you can get with FSM models of Collatz and where the limitations are. For a path that reaches 1 you can construct an FSM that models that path exactly. In some cases, you can even create a more compact FSM, provided you are willing to do resyncing at each 5 mod 8 node, but you can't do either without assuming the orbit converges to 1 in the first place, so it is certainly no substitute for a proof.

I also more clearly describe "the tape machine model" where the state machine is not calculating Collatz but acting as a verifier of a tape that has a sequence printed on it using a small log₂(M) bit register to track the mod M states as they pass under the tape head. The machine halts and catches fire if it detects a variation from the expected state.

---
The tape machine model

The machine we have in mind is not computing the Collatz sequence — it is verifying it. Imagine the sequence is already printed on a read-only tape. The machine has a single register of log₂(M) bits, holding the current odd term mod M, and a precomputed transition table of size M.

The table maps each source residue r mod M to a predicted destination residue (the next odd term mod M). The machine knows nothing else — it does not compute 3n+1, it does not calculate valuations, it does not inspect anything beyond the current register value and the next symbol on the tape.

At each step:

  1. Look up the current register value r in the table to get the predicted next odd residue r'.
  2. Read the next odd term from the tape and take its residue mod M.
  3. If the residue matches r', update the register and continue.
  4. If it doesn't match — the machine halts and catches fire.

That's the entire machine: a log₂(M)-bit register, a fixed lookup table, and a read-only tape. A run that completes without fire — reaching the terminal state 1 mod M — is a verification that the table correctly describes the path. The machine is non-trivial precisely because it can catch fire, and catching fire is meaningful.

When does the table make a wrong prediction?

Some source residues mod M uniquely determine the next odd residue mod M; others don't. The size of the table M is what determines which residues are predictive and which aren't.

  • At mod 8: residue 3 mod 8 always predicts next odd = 1 mod 8 (unique). Residue 7 mod 8 predicts next odd is 3 or 7 mod 8 (two options — not unique at mod 8 but deterministic at mod 32). Residue 1 mod 8 and 5 mod 8 are wide open at mod 8.
  • At mod 32: every 1 mod 8 source residue now uniquely predicts its destination mod-8 class. Most 5 mod 8 residues also narrow down considerably. But one residue — 21 mod 32 — remains a wildcard: it cannot predict its destination at this scale.

The wildcard residue is always the exceptional state r_k = (M²−1)/3 mod M. As M grows it migrates: 5 → 21 → 85 → 341 → … Only 1 in 4 of the 5 mod 8 residues at each scale remains a wildcard; the rest become fully predictive.

The high-edge condition

For source residues 3 and 7 mod 8, the next odd is (3n+1)/2. If the source residue mod M is ≥ 2M/3, the destination wraps above M — two different true successors can share the same destination residue mod M but diverge at the next step. The table cannot distinguish them, so it makes the wrong prediction and the machine catches fire.

This is the only failure mode for 1, 3, 7 mod 8 source residues at large enough M. High edges from 1 mod 8 and 5 mod 8 source residues don't cause fires — those nodes always map their successors to smaller values, staying within the same realm.

Collatz is then equivalent to: for every odd n, there exists a finite M such that the path n→1 never takes a high edge from a 3 or 7 mod 8 node at modulus M.

Two kinds of source-residue determinism

At each odd node on the tape, the table makes two predictions from the source residue alone:

  1. What is the destination residue mod M? (fully determined, partially determined, or wildcard)
  2. What mod-8 class does the next odd land in? (may be determined by a coarser residue)

At mod 8:

  • 3 mod 8: destination mod-8 class = 1, uniquely. Fully determined.
  • 7 mod 8: destination mod-8 class = {3, 7}. Partially determined.
  • 1 mod 8: destination mod-8 class fully open.
  • 5 mod 8: destination mod-8 class and distance both open.

At mod 32, every 1 mod 8 source residue uniquely determines its destination mod-8 class. For 5 mod 8:

  • 5 mod 32, 13 mod 32, 29 mod 32: destination constrained to 1 or 2 classes.
  • 21 mod 32: wildcard — destination and distance both unresolved at this scale.

5 mod 8 nodes as sync points

The wildcard residue at each scale is always 5 mod 8. Rather than treating this as a blocker, we use 5 mod 8 nodes as synchronisation points: when the machine encounters a 5 mod 8 source residue, it reads the tape until the next odd term appears and re-initialises the register with that term's residue mod M directly from the tape. No table lookup, no prediction, no fire risk — just a register reload.

Since 8 | M always, the machine identifies 5 mod 8 nodes from the register alone. The table only needs to make correct predictions for 1, 3, 7 mod 8 source residues between consecutive sync points, and the only failure mode there is the high-edge condition.

Theorem — M > peak(n) is sufficient

The odd peak must be 1 or 5 mod 8 — 3 and 7 mod 8 nodes always map strictly upward and can never be the peak.

When M > peak(n), every 3 or 7 mod 8 node x on the path has its successor also on the path, hence ≤ peak(n) < M. Therefore (3x+1)/2 < M, giving x < (2M−1)/3 < 2M/3. No high edges. No fires. QED.

Empirically verified (n = 3..499): in every case where the sync criterion permits a smaller M than the peak-based bound, the two-level machine completes without fire and matches the true path exactly. No fires observed.

Correction to the earlier conjecture

I previously conjectured M = 2^(2m−1) where m is the number of 5 mod 8 nodes. This is false — only ~10% of tested paths satisfy it. That n=761 case does match for the reduced m=4, M=2*4-1 is coincidental.

What is actually true

M > peak(n) is provably sufficient. The two-level machine can often do better: start from M > peak(n), then reduce M while no 1, 3, or 7 mod 8 node takes a high edge.

The fundamental limitation

None of this proves Collatz from scratch — you need to traverse the trajectory to find the peak first. But the tape-verification model gives a clean characterisation of the minimal machine for any known path.

reddit.com
u/jonseymourau — 24 days ago

A curious pattern in sequence differences

I have been playing around with sequences that have similar parity sequence prefixes. I picked a pair, 3969 and 619 which start with these prefixes respectively:

 OEEOEEOEEOEOEEOEEE
  OEOEEOEEOEOEEOEEE

I then enumerated and reversed the sequences and zipped them up so that their latter terms match, then calculated these two metrics a-b and (a-b)/b

Some notes:

  • the odd values of the 'a' sequence gets quite close to even values of the 'b' sequence on many occasions
  • when they split the ratio of the difference and the 'b' sequence term is typically ~5x
  • there are occasional flips where the b >> a

I am noting this here because this behaviour looked surprising to me. I haven't at this point tried this with other sequences that have a similar initial prefix or with sequences with random initial prefixes so I have not idea how common this phenomenon is or what explains either the near even-odd misses or the (a-b) ~= 5b phenomenon although putting it that way, it might just be an a ~= 6b phenomenon which is presumably a function of their initial relative position

I think this suggests some interesting empirical studies about the typical difference behaviour of sequences at different displacements:

- how important is the length of the shared starting prefix (if at all)?
- do they all oscillate with a regular magnitude?
- what factors best predict the regularity or amplitude of the oscillation?
- what predicts a run of off-by-one misses in the tail?

[(1, 1, 0, 0.0),  
(2, 2, 0, 0.0),  
(4, 4, 0, 0.0),  
(8, 8, 0, 0.0),  
(16, 16, 0, 0.0),  
(5, 5, 0, 0.0),  
(10, 10, 0, 0.0),  
(20, 20, 0, 0.0),  
(40, 40, 0, 0.0),  
(80, 80, 0, 0.0),  
(160, 160, 0, 0.0),  
(53, 53, 0, 0.0),  
(106, 106, 0, 0.0),  
(35, 35, 0, 0.0),  
(70, 70, 0, 0.0),  
(23, 23, 0, 0.0),  
(46, 46, 0, 0.0),  
(92, 92, 0, 0.0),  
(184, 184, 0, 0.0),  
(61, 61, 0, 0.0),  
(122, 122, 0, 0.0),  
(244, 244, 0, 0.0),  
(488, 488, 0, 0.0),  
(976, 976, 0, 0.0),  
(325, 325, 0, 0.0),  
(650, 650, 0, 0.0),  
(1300, 1300, 0, 0.0),  
(433, 433, 0, 0.0),  
(866, 866, 0, 0.0),  
(1732, 1732, 0, 0.0),  
(577, 577, 0, 0.0),  
(1154, 1154, 0, 0.0),  
(2308, 2308, 0, 0.0),  
(4616, 4616, 0, 0.0),  
(9232, 9232, 0, 0.0),  
(3077, 3077, 0, 0.0),  
(6154, 6154, 0, 0.0),  
(2051, 2051, 0, 0.0),  
(4102, 4102, 0, 0.0),  
(1367, 1367, 0, 0.0),  
(2734, 2734, 0, 0.0),  
(911, 911, 0, 0.0),  
(1822, 1822, 0, 0.0),  
(3644, 3644, 0, 0.0),  
(7288, 7288, 0, 0.0),  
(2429, 2429, 0, 0.0),  
(4858, 4858, 0, 0.0),  
(1619, 1619, 0, 0.0),  
(3238, 3238, 0, 0.0),  
(1079, 1079, 0, 0.0),  
(2158, 2158, 0, 0.0),  
(719, 719, 0, 0.0),  
(1438, 1438, 0, 0.0),  
(479, 479, 0, 0.0),  
(958, 958, 0, 0.0),  
(319, 319, 0, 0.0),  
(638, 638, 0, 0.0),  
(1276, 1276, 0, 0.0),  
(425, 425, 0, 0.0),  
(850, 850, 0, 0.0),  
(283, 283, 0, 0.0),  
(566, 566, 0, 0.0),  
(1132, 1132, 0, 0.0),  
(377, 377, 0, 0.0),  
(754, 754, 0, 0.0),  
(251, 251, 0, 0.0),  
(502, 502, 0, 0.0),  
(167, 167, 0, 0.0),  
(334, 334, 0, 0.0),  
(668, 668, 0, 0.0),  
(1336, 1336, 0, 0.0),  
(445, 445, 0, 0.0),  
(890, 890, 0, 0.0),  
(1780, 1780, 0, 0.0),  
(593, 593, 0, 0.0),  
(1186, 1186, 0, 0.0),  
(395, 395, 0, 0.0),  
(790, 790, 0, 0.0),  
(263, 263, 0, 0.0),  
(526, 526, 0, 0.0),  
(175, 175, 0, 0.0),  
(350, 350, 0, 0.0),  
(700, 700, 0, 0.0),  
(233, 233, 0, 0.0),  
(466, 466, 0, 0.0),  
(155, 155, 0, 0.0),  
(310, 310, 0, 0.0),  
(103, 103, 0, 0.0),  
(206, 206, 0, 0.0),  
(412, 412, 0, 0.0),  
(137, 137, 0, 0.0),  
(274, 274, 0, 0.0),  
(91, 91, 0, 0.0),  
(182, 182, 0, 0.0),  
(364, 364, 0, 0.0),  
(728, 121, 607, 5.016528925619835),  
(1456, 242, 1214, 5.016528925619835),  
(485, 484, 1, 0.002066115702479339),  
(970, 161, 809, 5.024844720496894),  
(323, 322, 1, 0.003105590062111801),  
(646, 107, 539, 5.037383177570093),  
(215, 214, 1, 0.004672897196261682),  
(430, 71, 359, 5.056338028169014),  
(143, 142, 1, 0.007042253521126761),  
(286, 47, 239, 5.085106382978723),  
(95, 94, 1, 0.010638297872340425),  
(190, 188, 2, 0.010638297872340425),  
(380, 376, 4, 0.010638297872340425),  
(760, 125, 635, 5.08),  
(253, 250, 3, 0.012),  
(506, 83, 423, 5.096385542168675),  
(1012, 166, 846, 5.096385542168675),  
(337, 332, 5, 0.015060240963855422),  
(674, 664, 10, 0.015060240963855422),  
(1348, 221, 1127, 5.099547511312217),  
(449, 442, 7, 0.01583710407239819),  
(898, 884, 14, 0.01583710407239819),  
(299, 1768, -1469, -0.8308823529411765),  
(598, 589, 9, 0.015280135823429542),  
(199, 1178, -979, -0.8310696095076401),  
(398, 2356, -1958, -0.8310696095076401),  
(796, 785, 11, 0.014012738853503185),  
(1592, 1570, 22, 0.014012738853503185),  
(3184, 523, 2661, 5.087954110898662),  
(1061, 1046, 15, 0.014340344168260038),  
(2122, 2092, 30, 0.014340344168260038),  
(707, 697, 10, 0.014347202295552367),  
(1414, 1394, 20, 0.014347202295552367),  
(2828, 2788, 40, 0.014347202295552367),  
(5656, 929, 4727, 5.088266953713671),  
(1885, 1858, 27, 0.014531754574811625),  
(3770, 619, 3151, 5.090468497576737)
]
u/jonseymourau — 26 days ago

Interactive 3x+1 Path Identity Visualiser

It is well known that all Collatz paths satisfy this identity:

b/2^e - a.3^o = K

where K is sometimes referred to as the carry term.

This 3D visualiser plots (a,b, log_2(K)) for every pair of odd points (a,b) in the path from a to 1.

The points are coloured according to their mod 8 residue.

You will notice that with log_2(K) pointing at you (so the plane has y=b, x=a) is that the rightmost stacks will always be red (5 mod 8) or green (1 mod 8). Of course, this is a consequence of that fact the paths that start highest must necessarily start with a descent (any such path that doesn't start with a descent is necessarily not a local maxima)

The above is a screen capture - the full interactive version can be accessed at the link below.

(https://wildducktheories.github.io/collatz/apps/collatz-a-b-k/dist/?a=27).

u/jonseymourau — 1 month ago

The well-known 2a+1 Collatz identity. as a composition of Steiner circuits.

It's well known that assuming certain modularity conditions are met, then the Collatz orbits from odd a and 2a+1 intersect at b. As a general rule if a and 2a+1 intersect, 2a+1 and 2*(2a+1)+1 will not intersect, at least not immediately and certainly not after a predictable number of iterations.

One way to represent this identity is as compositions of Steiner functions.

Let St(alpha, beta)(n) be an affine function that maps n to a Collatz successor m with alpha OE steps followed by beta E steps, then it can be shown that provide that path from a to b can be composed as:

St(1, beta) o St(alpha,1)

e.g. OE^{alpha}EOE^{beta}

then there is Steiner circuit

St(alpha+1, beta+2)

which will map 2a+1 to b. That is:

(OE)^{alpha+1}E^{beta+2}

In other words if the path from a b can be expressed as a Steiner circuit that begins with alpha OE repetitions followed by a single E and that ends on OE^beta, then (OE)^{alpha+1}E^{beta+1} will take 2a + 1 to b also.

This block of sympy is effectively a proof that this is so is provided:

import sympy as sy

a, g, h, alpha, beta =sy.symbols('a g h alpha beta')

def Steiner_fn(alpha, beta):
    return (g**alpha*a+(g**alpha-h**alpha)/(g-h))/h**(alpha+beta)
    
LHS=Steiner_fn(1,beta).subs(a, Steiner_fn(alpha, 1)).simplify()
RHS=Steiner_fn(alpha+1, beta+2).simplify()

display(LHS, RHS, (LHS-RHS.subs(a, 2*a+1)).subs({g:3, h:2}).simplify())

Another cute thing you can do with this is derived the RHS equation entirely from the LHS equation.

Consider this sequence:

OEOEOEEOE

which takes 59 to 101:

It can be represented with this affine equation:

OEOEOEEOE = Steiner\_fn(1,0).subs(a, Steiner\_fn(2, 1)).subs({g:3, h:2})

which resolves to:

(27a+23)/16

You can get the equation that takes 119 to 101 either by evaluating the RHS function

OEOEOEEE = Steiner\_fn(2+1, 0+2).subs({g:3, h:2})

to get:

(27a+19)/32

Or, you can substitute the inverse of a -> 2a into the LHS, so:

OEOEOEEOE.subs(a, (a-1)/2)

And you get exactly the same result. In other words, both affine transformations are the same function, subject to a relabelling.

u/jonseymourau — 1 month ago

Rigidity of the Syracuse Transition Matrix: Almost-Everywhere Exact Residue-to-Residue Transitions and the 2-adic Singularity −1/3

This paper explains why all the odd mod-8 residues, except 5 mod 8 have deterministic edge transition functions - that is, they depend only on the residue of the source state. 5 mod 8 states are unique because the next state is is determined by v2(3n+1)%8

It also shows how as you raise the nodulus to 32 or 64, the exception residue transitions from 5 to 21.

In fact, in general, a residue is determined by the source residue r iff 2^(v2(3r+1)+1)|M wnere M is the modulus in question.

Ultimately this is because 1,5,21,85,341 etc are approximations of the p-adic integer -1/3 (that is all integers who end with trailing bit sequence ...(01)^k)

What this means that is that Collatz graph has quite a unique structure - each 16 md 24 node has predecessors all of which are 5 mod 8. The edges between.5 mod 8 nodes are completely determined by the 5 mod 8 residue of S(a) where a is the source 5 mod 8 node and b is the next 5 mod 8 node - all the "randomness" of the Collatz graph is located entirely in the 2-adic valuation of the (3b+1) where b is the target node of a 5 mod 8 -> 5 mod 8 edge.

One practical implication of this is that each such edge can be represented by an affine function that maps a to b. Many different node pairs (a,b) will share the affine function that depends only on the pairty sequence that maps a to b, what makes it unique is S(a), which depends on the valuation 3a+1. The result of applying that function is b, e.g b = edge(S(a))

It likely that this work isn't completely novel and may be duplicative of G. J. Wirsching's work but I need to do more research to check.

wildducktheories.github.io
u/jonseymourau — 1 month ago

Why Steiner sentence analysis is the secret sauce of Collatz analysis

I just had an insight in a comment that I think is worth highlighting in caps.

The reason why Steiner sentence analysis is an extremely powerful technique for Collatz Graph analysis is simply this - it puts the problematic 5 mod 8 at the end of the sentence where it can't cause any trouble (because you are never evaluating it!)

Analysis of a Steiner sentence is exact - the transition probabilities are exact. All the randomness of the Collatz graph arises entirely in v2(8t+5) - everything else is just arithmetic.

reddit.com
u/jonseymourau — 1 month ago

Paper 67 — First-Principles Derivation of the Steiner Sentence Length Distribution

In a recent paper I proposed that Steiner sentence lengths vary according to 1/2^k but found that empiracally they very by 1/3.(3/4)^k This paper used the mod-8 state machine to derive the emprically observed frequency from first principles.

Proves that Steiner sentences in the Syracuse graph have length distribution P(sentence length=k)=3k−1/4k for all k≥1. A Steiner sentence is the maximal sequence of Steiner circuits between consecutive nodes ≡5(mod8); each circuit in the sentence is a Steiner word.

The proof requires no ergodic theory and no appeal to the Collatz conjecture. It rests on two classical arithmetic facts: the exact Syracuse transition matrix mod 8 (rows 1 and 5 are uniform via gcd(3,2j)=1; rows 3 and 7 have forbidden transitions forced by mod-16 arithmetic), and a structural invariant d3=d7 (equal weight on residue classes 3 and 7 in the surviving distribution) that is preserved unconditionally by the matrix. Given d3=d7, the surviving mass decays by exactly 3/4 per step, yielding the formula.

Appendix A provides complete empirical validation: 10^5 sentences sampled uniformly over [1,10^15], chi-squared tests (naive (1/2)k: χ2≈106, rejected; theory: χ2=12.9, p=0.61, consistent), and figures on both linear and log scales. Supersedes Paper 65.

ps: u/Successful-Owl1778 - this is a more complete answer to why bother with mod-8 state machines :-)

wildducktheories.github.io
u/jonseymourau — 1 month ago

Paper 66 — 2-adic Valuations of 3n+1 by Residue Class mod 8

Proves that the 2-adic valuation v2(3n+1) under the Syracuse map is exactly determined — or has an exactly determined expectation — by nmod8: classes 1, 3, 7 have constant valuations 2, 1, 1 (pointwise, for every n); class 5 has exact expected valuation 4 (under natural density), proved via gcd(3,2j)=1 and the tail-sum formula.

A corollary is the balance identity c1+c3+c5+c7=8, whose multiplicative form 34/28=(3/4)4 shows the geometric mean of the four asymptotic contraction ratios 3/2cr equals 3/4 — the same 3/4 that governs the sentence length distribution of Paper 67.

Also proved: the full distribution P(v2(3n+1)=j∣n≡5(mod8))=1/2j−2 for j≥3 (Proposition 4.1). All results machine-verified in Lean 4/Mathlib by the Aristotle automated proof assistant.

This paper goes a long way to explaining the asymmetry noted in this recent post that generated a lot of discussion.

wildducktheories.github.io
u/jonseymourau — 1 month ago

Paper: Steiner Branch Length Distribution — empirical result P(k) = (1/3)(3/4)^k [working paper]

Following on from recent posts about the mod-8 state machine and the single-circuit transition diagram, this paper presents a full empirical investigation of branch length statistics in the Steiner circuit graph, along with a structural explanation of the result.


Setup

A Steiner circuit branch is a maximal sequence of consecutive Steiner circuits along an orbit, terminating at the first circuit whose exit value is ≡ 5 (mod 8). The branch length k is the total number of circuits, including the terminal one.

Branches match the regular language: one or more repetitions of (7*3)?1, followed by a terminal (7*3)?5.

Sampling: 100,000 branches were drawn by choosing random t uniformly in [1, 10^15], setting n = 8t+5, and following the orbit until the next 5 mod 8 exit. The starting point n itself is not counted.


What the paper shows

The naive geometric prediction fails decisively. The 1 and 5 exits look superficially symmetric in the mod-8 state machine, suggesting P(k) = (1/2)^k. A chi-squared test rejects this with chi-squared ≈ 454,000.

The data fit P(k) = (1/3)(3/4)^k with high precision. A chi-squared test is consistent with this distribution.

What the fitted coefficients tell us:

  • Proved (Lemma 2.2): The 3-node splits 50/50. For n = 8a+3, S(n) ≡ 1 (mod 8) iff a is odd iff n ≡ 11 (mod 16). Exactly half of all 3 mod 8 values satisfy this.

  • Observed: The decay rate 3/4 implies each circuit terminates the branch with effective probability 1/4. The within-branch entry state distribution is measured empirically: entry via 1, 3, 7 mod 8 each ~31%; entry via 5 mod 8 ~6% (structurally suppressed — 5-exits terminate branches by definition).

  • Open problem: Why does the measured within-branch entry distribution produce an effective termination probability of exactly 1/4? This is the structural question that a first-principles proof would need to answer.

  • Conjectured (Conjecture 5.1): The distribution P(k) = (1/3)(3/4)^k is exact.


What the paper does NOT prove

The distribution formula P(k) = (1/3)(3/4)^k is a conjecture, not a theorem. It depends on Conjecture 5.2 (uniform entry-state distribution), which remains unproved. No claim is made about convergence of the Collatz sequence.


Context

This is part of a speculative results stream (papers numbered 64+k) running alongside the main rigorous programme (papers 32+k). The speculative stream presents empirical observations and structural conjectures explicitly labelled as such. All claims are clearly marked as empirical or conjectural throughout.

This post picks up the thread from:


Working paper notice

This is a working paper in the speculative stream. Results and conjectures are subject to revision. The empirical observations are reproducible; the conjectural status of the main formula is clearly stated.

PDF: https://wildducktheories.github.io/collatz/papers/65-branch-distribution/65-branch-distribution.pdf

wildducktheories.github.io
u/jonseymourau — 1 month ago

Paper: A Regular Expression Language for the Collatz Graph [working paper

This paper formalises and extends ideas I've posted here over the past week into a single coherent framework. It is the architectural foundation of a larger four-paper programme on the Collatz conjecture.


What the paper proves

The mod-8 step taxonomy. Every odd integer n falls into one of four residue classes mod 8, each with completely determined successor structure under the Syracuse map S(n) = (3n+1) / 2^v2(3n+1):

  • n ≡ 1 (mod 8): exits to all odd residues mod 8
  • n ≡ 3 (mod 8): exits only to 1 or 5 (mod 8), with a 50/50 split determined exactly by whether n ≡ 11 (mod 16)
  • n ≡ 5 (mod 8): exits to all odd residues mod 8
  • n ≡ 7 (mod 8): exits only to 3 (mod 8)

Steiner circuits. A Steiner circuit is a maximal run of the form (OE)^(α-1) OEE+ — one complete "excursion" through the Syracuse map. The paper proves that:

  • Every Steiner circuit is described by exactly two parameters (α, β) where α = v2(n+1) and β = v2(3n+1)
  • The 7-run length theorem: a run of consecutive 7 mod 8 terms has length exactly v2(n+1) - 2

The mod-24 adjacency table. For each of the 12 odd residues mod 24, the paper derives the exact parametric form of S(24a+r) and its residues mod 8 and mod 24. This fully characterises the arithmetic structure of the Syracuse map at mod-24 resolution.

Mod-24 parity-prefix completeness. The mod-24 stratum of n completely determines whether its Steiner circuit has a bare prefix or a 7*3 leader.


What the paper does NOT prove

The regular expression conjecture — that the language

((7*3)?(1|5))*

over the alphabet {1, 3, 5, 7} characterises all odd Collatz orbits — is stated as Conjecture 5.1. The structural argument is laid out in detail, but the proof is deferred to a later revision of this paper. No claim is made that this constitutes a proof of the Collatz conjecture.

The 5 mod 8 overlay tree structure is described but its full properties are deferred to revisions of this paper or later papers.


Context

This supersedes my earlier post A Regular-Language and Tree Representation of Odd Collatz Dynamics and incorporates the mod-24 universe diagram from this post, the compressed circuit notation from this post, and the regex itself first claimed in this post.


Working paper notice

This is a working paper. Results, notation, and structure are subject to revision. Proved results are clearly distinguished from conjectures throughout.

PDF: https://wildducktheories.github.io/collatz/papers/33-architecture/33-architecture.pdf

wildducktheories.github.io
u/jonseymourau — 1 month ago

Emprical fit - frequency of Steiner circuit sentence length as a function of Steiner circuit sentence length

If we define a Steiner circuit sentence as a sequence of 0 or more Steiner circuits between the S(8a+5) and the next value n of the form 8b+5, then I predicted the distribution would be 1/2^k

In fact, it is a rather more intriguing 1/3.(3/4)^k

I am not quite sure why yet, but it is a very nice result!!!

u/jonseymourau — 1 month ago

The mod-8 state transition diagram for a single Steiner Circuit

Yesterday I posted the universal mod-8 Collatz state machine.

That state machine described all odd Collatz paths (or, alternatively, all Syracuse paths)

This machine is a specialisation of that state machine focused on a single Steiner circuit.

One dramatic feature of this state machine that leaps out is this:

Conditional on a node entering via a Steiner circuit entering via a 7 or a 3, it has a 7/8 chance of exiting via 5 mod 8.

In other words, the states that cause growth in n also tend to favour exit via states that cause. a large decay in n.

If I have done the maths correctly:***

- 11/32 exit via 1
- 19/32 exit via 5

Of course, I haven't tried to calculate the expected growth because of the confounding 7 repetitions, but interesting nonetheless, I think this does show the value of using a state machine lense to view Collatz graphs.

Not coincidentally, I think, 27 = is one of the (relatively) rare (freq=1/8) 3 mod 8 nodes that exits via the 11 mod 16 branch - it doesn't get degraded as much as your typical (freq=7/8) 3 mod 8 node.

update: *** the assumption that I ddi the math correctly could be flawed - checking …

corrected analysis:

The empirical truth is that conditional on entry via 3,7,5 the bias in favour of exiting via 5 is actually 2/3 not 7/8. The reason is instructive. I was assuming the exit probability was a completely independent variable and that all outcomes (1,3,5,7,9,11,13,15) mod 16 were equally likely but this not the case - the pre-condition actually contributes a bias to the exit probabilities. At some point I might work out exactly, assuming all entry states are equiprobable.

—-

That's actually quite a nice result by itself:

exit via 1: 1/4 + (1/3 * 3/4) = 1/2
enter via 3,5,7, exit via 5: 3/4 * 2/3 = 6/12 = 1/2

So Steiner circuits do not induce any bias via in the 1 vs 5 distribution in themselves which is not surprising since a Steiner circuit is one of the fundamental (composite) building blocks of Collatz paths.

(I still need to derive the 2/3 result from first principles though)

—-

Ah, the first principles derivation is this:

- all nodes entering via 7 exit via 3 - so we don't need to measure the complexity of the 7 repetitions
- 3 mod 8 exits via 1,5 with equal probabilty - it is just algebra
- Steiner circuits don't introduce any mod 8 bias in themselves, so you ignore contributions from prior states.

P(exit via 5| entry via 3,5,7) = 1/3*1/2 + 1/3*1 + 1/3*1/2 = 2/3

—-

One truly awesome consequence of all of this if it is true is that the distribution of Steiner circuit lengths between two 5 mod 8 nodes ought vary according to 1/2^k where k is the count of Steiner circuits.

—-

It turns out that if you measure it the actual frequency is 1/3.(3/4)^k not 1/2^k and that fit does pass a Chi-squared test. Now to explain why!!

More on this here

u/jonseymourau — 1 month ago
▲ 10 r/Collatz

The Mod-8 Collatz State Machine

This diagram shows all the valid state transitions along an odd-Collatz path in one easy to read diagram.

Every structural count in the mod-8 state machine is a multiple of 3:         

  - In-degree 3: every state has exactly 3 inbound edges (including self-loops) one from each of its three mod-24 representatives.                           

  - 3 self-loops: states 7, 1, and 5 each have a self-transition; state 3 does not.

  - 3 bidirectional transitions: 3↔1, 3↔5, and 1↔5.

  - 3 unidirectional transitions: 7→3, 1→7, and 5→7.                            

State 3 is the sole exception to self-referentiality: it is a pure funnel, with no self-loop and no outgoing back-links.

(The irony, of course, is that there are 4 of these degree-3 structural counts, not 3 - off-by-one errors, huh?)

update: I've added a 3D animation of the state machine (the 3rd dimension allowed me to escape the confines of the 2D plane and add edges to the initial and final states without needing an ugly crossing

https://wildducktheories.github.io/collatz/apps/collatz-fsm/dist/?a=27

u/jonseymourau — 2 months ago
▲ 8 r/Collatz+1 crossposts

An interactive mod8/mod24 Collatz Graph visualizer

In a previous post I discussed the notion of a Collatz overlay built from 5 mod 8 and 0 mod 3 nodes. One refinement here is that there are nodes of in-degree 2 that are not 5 mod 8 (they are relatively rare - the exceptions I see are 1,23 mod 24)

This visualization allows you to see all 4, odd mod 8 nodes and in fact classifies them according to mod 24 too.

You give it a starting point with the ?a= parameter and then you can extend the graph is you like by clicking on a node.

This a fantastic way to develop an intuitive understanding of mod 8 and mod 24 Collatz dynamics.

https://wildducktheories.github.io/collatz/apps/collatz-graph/dist/?a=27

A fun game to play is greedily clicking on the red dots and then on 1,2 mod 3 nodes that result from such a clicking.

Does that game ever end? I think not.

u/jonseymourau — 2 months ago

An alternative compressed notation for Steiner circuits:

In a previous post I described a regex that could match Steiner circuits. That notation was:

(7*3)?(1|5)

With any odd Collatz path being a repetition of that basic pattern.

Here is a notation that captures the same thing, using an exponential notation that captures the precise identity of the Steiner circuit in its exponents.

7^{α-2}3^{α-1}1^{2-β}5^{β-1} 

where:

α = o
β = e-o

{ n^k } means k repeats of n, k >0
{ n^k } means {} when k <= 0

The cool thing about this is that it encodes the mod 8 character of each element of the Steiner circuit.

So:

OEE -> 1
OEOEE-> 31
OEEE -> 5
OEEEE -> 5^2
OEOEOEE -> 731

My claim is that you can describe a Collatz graph entirely where the (interesting*) nodes of in-degree 2 are 5 mod 8 and edges are strings of Steiner circuits expressed with this notation. This is the overlay graph described previously. The leaves of this graph are all 0 mod 3. If you delete the (1,1) edge and the Collatz conjecture is true, then the graph is a tree. If the Collatz conjecture is false the graph has multple disconnected components.

By interesting*, I mean fully recursive. Other nodes have branches, but one of them leads immediately to an 5 mod 8 node and the other leaves straight to a 0 mod 3 - extended recursion of the (reverse) walk in the Collatz graph only happens via 5 mod 8 nodes.

I am preparing a paper that describes this more fully, but that's the basic idea.

reddit.com
u/jonseymourau — 2 months ago

The mod-24 Collatz universe in a single image - choose your own adventure!

This diagram plots residues mod 24 and how they are mapped under the Collatz map to residues mod 2,4,6,8,12.

You start at a value, 'a', calculate a mod 24. and b = (3a+1)/2^v2(3a+1)

Place your token on the outermost ring. Follow the red edge to an inner circle. The angle of other end of the red edge will be 2.pi.r'/R' where r' is the target residue and R' is the target radius.

Now, take the dotted edge back to R=24 where the angle of the resulting point is 2.pi.b/24.

Continue until you hit R'=2, r'=1 for b=1

u/jonseymourau — 2 months ago