OFFSET
3,1
COMMENTS
As you can see in Garner's paper, it is possible to use formulas to determine some terms of the different rows.
From theorem 1 you can find one of these formulas: for n>4 we have that 2^(n-1)+(-1)^(n-1)*2^(n-2)-2 are terms of T(n,k).
LINKS
V. Barbera, Table of n, a(n) for n = 3..8640 (rows 3..20 flattened)
Lynn E. Garner, On Heights in the Collatz 3n+1 Problem, Discrete Math. 55 (1985) 57-64.
EXAMPLE
PROG
(PARI) collatz_k(x, k_max)= {my(k=valuation(x, 2), m=0, temp); k=min(k_max, k); x>>=k; while(k<k_max&&x>1, x++; temp=valuation(x, 2); temp=min(temp, k_max-k); x>>=temp; x*=3^temp; x--; k+=temp; m+=temp; temp=valuation(x, 2); temp=min(temp, k_max-k); x>>=temp; k+=temp); [x, m, k]};
rows(n)={if(n>2, my(dim=2^(n+1)-1, ra=vector(dim, i, i), a_min=2, dim_i=6); for(n_i=3, n, dim_i*=2; dim_i+=2; for(a=a_min, dim_i, if(ra[a]>0, my(xt, mt, kt); [xt, mt, kt]=collatz_k(a, n_i); b=a+1; if([xt, mt, kt]==collatz_k(b, n_i), print1(a, ", "); forstep(i=a, dim, 2^n_i, ra[i]=0), if(kt<n_i, ra[a]=0)), if(a==a_min, a_min++))); print()))};
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
V. Barbera, Apr 19 2026
STATUS
approved
