OFFSET
1,3
COMMENTS
The terms in the trajectory counted by a(n) might be called "branch points", since they are exactly the numbers that can be reached in more than one way under the Collatz map. So a(n) is a measure of the "Collatz complexity" of n. The term (with a slightly different definition) was suggested by Emanuel Landeholm.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
EXAMPLE
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.
MATHEMATICA
Table[Count[NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, k, # > 1 &], _?(And[# != 1, Mod[#, 3] == 1] &)] , {k, 100}] (* Michael De Vlieger, Sep 11 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Sep 11 2023, suggested by a sequence submitted by Emanuel Landeholm on Sep 10 2023 but later withdrawn, which had a somewhat different definition and contained errors.
STATUS
approved