Working Backwards

Although the forward equation is quite easy to calculate, calculating the precursors of a given number is more interesting. Looking at "1", we see that it is preceded by the infinite sequence of powers of 2. We are focusing on odd predecessors, so we have to find powers of two that fit the equation

    2k = 3x+1
 => x = (2k-1) / 3.

Where x is an integer. Only even values of k lead to integer solutions, giving;

k (2k-1) / 3
2 (4-1)/3 = 1
4 (16-1)/3 = 5
6 (64-1)/3 = 21
8 (256-1)/3 = 85
k (2k-1) / 3
10 (1024-1)/3 = 341
12 (4096-1)/3 = 1,365
14 (16384-1)/3 = 5,461
16 (65536-1)/3 = 21,845

Etc. For numbers other than 1, say 'A', we get the similar equation

A.2k = 3x+1, or x = (A.2k-1) / 3.

Calculating x for a few values of A and k we can see a pattern;

x(A,k) k=2 k=4 k=6
A=1 1 5 21
A=7 9 37 149
A=13 17 69 277
x(A,k) k=1 k=3 k=5
A=5 3 13 53
A=11 7 29 117
A=17 11 45 181

When A is a multiple of three we get no predecessors, as a multiple of three can't be of the form 3x+1. When A is one more than a multiple of 6, k will be even, and when it is one less than a multiple of 6, k will be odd. The smallest precursors are therefore: 6n+1 -> 8n+1; 6n+5 -> 4n + 3.

When reading down the columns the values increase linearly in steps of 2(k+1), whereas across the table they increase geometrically as x -> 4x+1.

The next two tables are extensions of the previous tables, but now the numbers are colour-coded according to their remainders when divided by 6.

A\k   2 4 6 8 10 12 14 16 18
1   1 5 21 85 341 1,365 5,461 21,845 87,381
7   9 37 149 597 2,389 9,557 38,229 152,917 611,669
13   17 69 277 1,109 4,437 17,749 70,997 283,989 1,135,957
19   25 101 405 1,621 6,485 25,941 103,765 415,061 1,660,245
25   33 133 533 2,133 8,533 34,133 136,533 546,133 2,184,533
31   41 165 661 2,645 10,581 42,325 169,301 677,205 2,708,821
A\k   1 3 5 7 9 11 13 15 17
5   3 13 53 213 853 3,413 13,653 54,613 21,8453
11   7 29 117 469 1,877 7,509 30,037 120,149 480,597
17   11 45 181 725 2,901 11,605 46,421 185,685 742,741
23   15 61 245 981 3,925 15,701 62,805 251,221 1,004,885
29   19 77 309 1,237 4,949 19,797 79,189 316,757 1,267,029

Notice that numbers of the form 6n+5 have a smaller odd predecessor. This can be used to generate arbitrary long sequences of numbers where (3x+1)/2 is odd and (3*(3x+1)/2+1) is larger than 3x+1.

The colour patterns repeat every 3 rows, as we can see from the following tables

A\k   2 4 6
18n+1   24n+1 = 6.(4n)+1 96n+5 = 6.(16n)+5 384n+21 = 6.(64n+3)+3
18n+7   24n+9 = 6.(4n+1)+3 96n+37 = 6.(16n+6)+1 384n+149 = 6.(64n+24)+5
18n+13   24n+17 = 6.(4n+2)+5 96n+69 = 6.(16n+11)+3 384n+277 = 6.(64n+46)+1
A\k   1 3 5
18n+5   12n+3 = 6.(2n)+3 48n+13 = 6.(8n+2)+1 192n+53 = 6.(32n+8)+5
18n+11   12n+7 = 6.(2n+1)+1 48n+29 = 6.(8n+4)+5 192n+117 = 6.(128n+19)+3
18n+17   12n+11 = 6.(2n+1)+5 48n+45 = 6.(8n+7)+3 192n+181 = 6.(128n+30)+1

Other Pages

Blue Chains: We can use the fact that the smallest predecessor of 6n+5 values is less that the original value to create arbitrary long chains of increasing odd values.
The 5 based sub-tree: This page uses a reverse iteration algorithm to find those numbers that converge on 5.
How reverse iteration works: This page explains the reverse iteration algorithm and uses it to find those numbers that converge on 85.