A362940 Consider the Collatz trajectory from n to 1, assuming the Collatz conjecture is true. Then a(n) = number of terms in the trajectory that are greater than 1 and congruent to 1 mod 3. If n never reaches 1, set a(n) = -1.
0, 0, 3, 1, 2, 3, 9, 1, 10, 3, 7, 3, 5, 9, 8, 2, 6, 10, 11, 3, 3, 8, 7, 3, 13, 5, 61, 10, 9, 8, 59, 2, 14, 7, 6, 10, 12, 11, 18, 4, 60, 3, 17, 8, 8, 8, 57, 3, 14, 13, 12, 6, 5, 61, 62, 10, 18, 10, 17, 8, 10, 59, 58, 3, 15, 14, 15, 7, 7, 7, 56, 10, 64, 12, 7, 12
Offset: 1
Keywords
Examples
The Collatz trajectory of 7 is 7 22 34 17 52 26 13 40 20 10 5 16 8 4 2 1, which contains 9 terms > 1 and 1 mod 3, so a(7) = 9.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Table[Count[NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, k, # > 1 &], ?(And[# != 1, Mod[#, 3] == 1] &)] , {k, 100}] (* _Michael De Vlieger, Sep 11 2023 *)
Comments