Remix.run Logo
tromp 8 hours ago

The closely related function Col' which also divides 3n+1 by 2 in the odd case, is concisely represented by the 65-bit lambda calculus term λ1(λλλ31(λλ2(421)))(λλ1)1(λλ1) operating on Church numerals [1]. It starts from the pair of numbers n and 0 and then performs n iterations of swapping the numbers after incrementing the first. Its lambda diagram is

    ┬───────────────┬──
    │ ┬────────── ─ │ ─
    │ ┼─────┬──── ┬ │ ┬
    │ ┼─┬───┼──── │ │ │
    │ └─┤ ┬─┼─┬── │ │ │
    │   │ ┼─┼─┼─┬ │ │ │
    │   │ │ └─┤ │ │ │ │
    │   │ │   ├─┘ │ │ │
    │   │ ├───┘   │ │ │
    │   ├─┘       │ │ │
    └───┤         │ │ │
        └─────────┤ │ │
                  └─┤ │
                    └─┘
[1] https://github.com/tromp/AIT/blob/master/fast_growing_and_co...