login
A375782
The 2-adic valuation of the result, starting from n, of Collatz steps x -> (3x+1)/2 while odd.
2
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, 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, 3, 1, 1, 3, 1, 1, 1, 2, 2, 1, 2, 4, 1, 1, 2, 2, 7, 1, 3
OFFSET
1,3
COMMENTS
The number of steps is A007814(n+1) and their result is 2*A085062(n).
a(n) = 1 iff A085062(n) is odd, which is when n+1 is in A338691.
FORMULA
For n == 0 (mod 2), a(n) = A007814(n).
For k > 0, a(2^k-1) = A007814(3^k-1).
a(n) = 1 + A007814(A085062(n)).
EXAMPLE
7 -> 11 -> 17 -> 26, so a(7) = A007814(26) = 1.
PROG
(PARI) a(n)= valuation((3/2)^valuation(n+1, 2)*(n+1)-1, 2);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ruud H.G. van Tol, Aug 28 2024
STATUS
approved