%I #19 Sep 01 2024 09:37:54
%S 1,1,3,2,3,1,1,3,1,1,1,2,2,1,4,4,1,1,2,2,5,1,4,3,1,1,1,2,2,1,1,5,1,1,
%T 4,2,3,1,1,3,1,1,1,2,2,1,1,4,1,1,2,2,4,1,2,3,1,1,1,2,2,1,3,6,1,1,3,2,
%U 3,1,1,3,1,1,1,2,2,1,2,4,1,1,2,2,7,1,3
%N The 2-adic valuation of the result, starting from n, of Collatz steps x -> (3x+1)/2 while odd.
%C The number of steps is A007814(n+1) and their result is 2*A085062(n).
%C a(n) = 1 iff A085062(n) is odd, which is when n+1 is in A338691.
%H Ruud H.G. van Tol, <a href="/A375782/b375782.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>
%F For n == 0 (mod 2), a(n) = A007814(n).
%F For k > 0, a(2^k-1) = A007814(3^k-1).
%F a(n) = 1 + A007814(A085062(n)).
%e 7 -> 11 -> 17 -> 26, so a(7) = A007814(26) = 1.
%o (PARI) a(n)= valuation((3/2)^valuation(n+1, 2)*(n+1)-1, 2);
%Y Cf. A007814, A085062, A338691, A363270.
%K nonn,easy
%O 1,3
%A _Ruud H.G. van Tol_, Aug 28 2024