OFFSET
0,4
EXAMPLE
a(3)= 5 because, starting with 7, the iteration produces 11,17,13,5 and 5 is the first term less than 7.
MATHEMATICA
f[n_]:=NestWhileList[(3*#+1)/2^IntegerExponent[3*#+1, 2]&, 2*n+1, #>1&];
nextOddK[n_]:=Module[{m=3n+1}, While[EvenQ[m], m=m/2]; m]; dt[n_]:=Module[{m=n, cnt=0}, If[n>1, While[m=nextOddK[m]; cnt++; m>n]]; cnt];
Table[Part[f[i], dt[2i+1]+1], {i, 0, 70}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Jul 21 2018
STATUS
approved