A348094 If the Collatz trajectory of n reaches 1, say after k steps, and there is an integer m > n such that T^i(m) and T^i(n) have the same parity for i = 0..k (where T^i denotes the i-th iterate of the Collatz map A006370), then a(n) is the least such m, otherwise a(n) is -1.
2, 4, 35, 8, 21, 70, 2055, 16, 8201, 42, 1035, 140, 141, 4110, 4111, 32, 529, 16402, 16403, 84, 85, 2070, 2071, 280, 65561, 282, 1180591620717411303451, 8220, 8221, 8222, 147573952589676412959, 64, 262177, 1058, 1059, 32804, 32805, 32806, 8388647, 168
Offset: 1
Keywords
Examples
The first terms, alongside the binary representations of A125711(n) and of A125711(a(n)), are: n a(n) h(n) h(a(n)) - ---- ----------------- -------------------------------------- 1 2 1 11 2 4 11 111 3 35 10101111 10101111101111 4 8 111 1111 5 21 101111 10111111 6 70 110101111 110101111101111 7 2055 10101011011101111 10101011011101111110111010101111101111 8 16 1111 11111
Links
Programs
-
Mathematica
A348094[n_] := n+2^(Length[NestWhileList[If[OddQ[#], 3#+1, #]/2 &, n, #>1 &]]-1); Array[A348094, 50] (* Paolo Xausa, Apr 05 2024 *)
-
PARI
a(n) = { my (h=0, r=n); while (r>1, if (r%2, r=3*r+1, r=r/2; h++)); n+2^h }
Comments