A280341 Number of distinct heights achieved in the Collatz (or '3x+1') problem when starting from numbers in the range [2^n,2^(n+1)).
1, 2, 4, 6, 10, 16, 26, 41, 53, 64, 74, 85, 101, 118, 128, 144, 157, 174, 195, 217, 238, 261, 281, 309, 324, 342, 364, 397
Offset: 0
Keywords
Examples
The heights for starting values 16 to 31 are: 4, 12, 20, 20, 7, 7, 15, 15, 10, 23, 10, 111, 18, 18, 18, 106. The unique heights are: 4, 12, 20, 7, 15, 10, 23, 111, 18, 106. Hence a(4)=10.
Programs
-
Mathematica
collatz[n_] := If[EvenQ[n], n/2, 3n+1] height[n_] := Length[NestWhileList[collatz, n, #!=1&]] - 1 a280341[n_] := Length[Union[Map[height, Range[2^n, 2^(n+1)-1]]]] (* sequence data; long computation times for n >= 22 *) Map[a280341, Range[0, 27]] (* Hartmut F. W. Hoft, Dec 16 2020 *)
Extensions
a(25)-a(27) from Hartmut F. W. Hoft, Dec 16 2020
Comments