%I #35 Jul 02 2023 00:02:19
%S 1,1,1,1,1,3,13,1,7,5,13,3,5,7,5,1,13,9,11,5,1,11,5,3,19,13,31,7,11,
%T 15,121,1,25,17,5,9,7,19,67,5,31,21,49,11,17,23,121,3,37,25,29,13,5,
%U 27,47,7,43,29,67,15,23,31,91,1,49,33,19,17,13,35,121,9,55
%N The result, starting from n, of Collatz steps x -> (3x+1)/2 while odd, followed by x -> x/2 while even.
%C Each x -> (3x+1)/2 step decreases the number of trailing 1-bits by 1 so A007814(n+1) of them, and the result of those steps is 2*A085062(n).
%H Dustin Theriault, <a href="/A363270/b363270.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = OddPart((3/2)^A007814(n+1)*(n+1) - 1), where OddPart(t) = A000265(t).
%F a(n) = OddPart(A085062(n)).
%t OddPart[x_] := x / 2^IntegerExponent[x, 2]
%t Table[OddPart[(3/2)^IntegerExponent[i + 1, 2] * (i + 1) - 1], {i, 100}]
%o (C) int a(int n) {
%o while (n & 1) n += (n >> 1) + 1;
%o while (!(n & 1)) n >>= 1;
%o return n;
%o }
%o (PARI) oddpart(n) = n >> valuation(n, 2); \\ A000265
%o a(n) = oddpart((3/2)^valuation(n+1, 2)*(n+1) - 1); \\ _Michel Marcus_, May 24 2023
%Y Cf. A000265, A085062.
%Y Cf. A160541 (number of iterations).
%Y Cf. A075677.
%K nonn,easy
%O 1,6
%A _Dustin Theriault_, May 23 2023