%I #24 Mar 13 2023 11:43:20
%S 1,2,4,8,5,3,6,12,24,17,11,7,14,9,18,36,25,49,33,65,43,86,57,39,78,
%T 153,105,203,135,270,185,123,246,169,329,219,159,295,569,379,283,505,
%U 377,251,167,111,222,444,297,593,395,263,175,350,233,155,103,206,137,91,182
%N Smallest starting value in a Collatz '3x+1' sequence such that the sequence contains exactly n halving steps.
%C First occurrence of n in A006666.
%C The graph of this sequence has features similar to those of A092893, but with the x-axis scaled by log(3)/log(2). - _T. D. Noe_, Apr 09 2007
%H T. D. Noe, <a href="/A092892/b092892.txt">Table of n, a(n) for n=0..500</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/CollatzProblem.html">Collatz Problem.</a>
%H <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>
%e a(5)=3 because the Collatz sequence 3,10,5,16,8,4,2,1 is the first sequence containing 5 halving steps.
%t coll[n_]:= NestWhileList[If[EvenQ[#], #/2, 3#+1] &, n, #>1 &]; Table[i = 1; While[Count[coll[i], _?EvenQ] != n, i++]; i, {n, 0, 60}] (* _Jayanta Basu_, Jun 05 2013 *)
%o (Haskell)
%o import Data.List (elemIndex); import Data.Maybe (fromJust)
%o a092892 = (+ 1) . fromJust . (`elemIndex` a006666_list)
%o -- _Reinhard Zumkeller_, Mar 14 2014
%Y Cf. A006666, A092893.
%K nonn,look
%O 0,2
%A _Hugo Pfoertner_, Mar 11 2004