

A304030


a(n) is the number of steps at which the Collatz ('3x+1') trajectory of n crosses its initial value, or 1 if the number of crossings is infinite.


2



0, 0, 1, 0, 1, 4, 3, 0, 5, 2, 3, 2, 3, 8, 3, 0, 3, 10, 7, 0, 1, 6, 1, 0, 9, 2, 3, 6, 7, 4, 3, 0, 13, 4, 1, 4, 5, 8, 9, 0, 7, 2, 5, 2, 3, 4, 5, 0, 5, 8, 5, 0, 1, 14, 9, 0, 7, 2, 3, 6, 7, 12, 9, 0, 5, 6, 3, 0, 1, 4, 7, 0, 13, 2, 1, 2, 3, 8, 3, 0, 7, 14, 11, 0, 1, 8, 3, 0, 3, 2, 7, 4, 5, 12, 9, 0, 19, 4, 1, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,6


COMMENTS

Some treatments of the Collatz conjecture view trajectories as starting to cycle when they reach 1, continuing with 4, 2, 1, 4, 2, 1, ..., while others view trajectories as terminating as soon as 1 is reached; this sequence treats trajectories as terminating at 1.
If the Collatz conjecture is true, then for n > 1, a(n) == n (mod 2).
If there exists any number n whose Collatz trajectory enters a cycle that includes values above and below n, then the number of crossings would be infinite. If the Collatz conjecture is true, then there exists no such value of n.
If a(k) = 0, then a(2^j * k) = 0, for j>0. Therefore the primitives are 1, 20, 24, 52, 56, 68, 72, 84, 88, 100, 116, ..., .  Robert G. Wilson v, May 19 2018


LINKS

Table of n, a(n) for n=1..100.
Index entries for sequences related to 3x+1 (or Collatz) problem


EXAMPLE

The Collatz trajectory of 6 crosses its initial value (6) a total of 4 times, so a(6) = 4:
.
16
/ \
/ \
10 / \
/ \ / \
/ \ / 8
6****
\ / \ / \
\ / 5 \
\ / \
\ / 4
3 \
...
(Each "*" represents a crossing.)


MATHEMATICA

Collatz[n_] := NestWhileList[ If[ OddQ@#, 3# +1, #/2] &, n, # > 1 &]; f[n_] := Block[{x = Length[ SplitBy[ Collatz@ n, # < n +1 &]]  1}, If[ OddQ@ n && n > 1, x  1, x]]; Array[f, 100] (* Robert G. Wilson v, May 05 2018 *)


CROSSREFS

Cf. A006370, A070165.
Sequence in context: A016697 A086466 A204694 * A242721 A251610 A021703
Adjacent sequences: A304027 A304028 A304029 * A304031 A304032 A304033


KEYWORD

nonn


AUTHOR

Jon E. Schoenfield, May 04 2018


STATUS

approved



