%I #87 Feb 11 2022 11:21:31
%S 0,1,6,1,3,1,11,1,3,1,8,1,3,1,11,1,3,1,6,1,3,1,8,1,3,1,96,1,3,1,91,1,
%T 3,1,6,1,3,1,13,1,3,1,8,1,3,1,88,1,3,1,6,1,3,1,8,1,3,1,11,1,3,1,88,1,
%U 3,1,6,1,3,1,83,1,3,1,8,1,3,1,13,1,3,1,6,1,3,1,8,1,3,1,73,1,3,1,13,1,3,1,6
%N "Dropping time" in 3x+1 problem starting at n (number of steps to reach a lower number than starting value); a(1) = 0 by convention. Also called glide(n).
%H N. J. A. Sloane, <a href="/A102419/b102419.txt">Table of n, a(n) for n = 1..10000</a>
%H Eric Roosendaal, <a href="http://www.ericr.nl/wondrous/index.html">On the 3x + 1 problem</a>
%H N. J. A. Sloane, <a href="/A102419/a102419.txt">First 36 terms of A217934 and A060412</a> [From Roosendaal web site]
%F a(2n) = 1; a(2n+1) = A060445(n).
%F a(n) = A074473(n)-1 for n>1.
%F a(n) = floor(A126241(n)*(1+log(2)/log(3))). - _K. Spage_, Oct 22 2009
%e 1: 0 steps
%e 2 1: 1 step
%e 3 10 5 16 8 4 2 1: 6 steps (before it drops below n)
%e 4 2 1: 1 step
%e 5 16 8 4 2 1: 3 steps
%e 6 3 ...: 1 step
%e 7 22 11 34 17 52 26 13 40 20 10 5 ...: 11 steps
%e ...
%e Records: 0.1.6.11.96.132...171... (A217934)
%e at.......1.2.3..7.27.703.10087... (A060412)
%t Prepend[Table[Length[NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#>=n&]],{n,2,99}],1]-1 (* _Jayanta Basu_, May 28 2013 *)
%o (Python)
%o def a(n):
%o if n<3: return n - 1
%o N=n
%o x=0
%o while True:
%o if n%2==0: n//=2
%o else: n = 3*n + 1
%o x+=1
%o if n<N: return x
%o print([a(n) for n in range(1, 101)]) # _Indranil Ghosh_, Apr 22 2017
%Y Cf. A060445, A074473, A126241.
%Y For records see A060412, A217934. - _N. J. A. Sloane_, Oct 20 2012
%K nonn
%O 1,3
%A _N. J. A. Sloane_, Sep 15 2006
|