

A102419


"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).


8



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, 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, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


COMMENTS

a(2n) = 1; a(2n+1) = A060445(n).
a(n) = A074473(n)1 for n>1.
a(n) = floor(A126241(n)*(1+log(2)/log(3))). [K. Spage, Oct 22 2009]


LINKS

N. J. A. Sloane, Table of n, a(n) for n = 1..10000
Eric Roosendaal, On the 3x + 1 problem
N. J. A. Sloane, First 36 terms of A217934 and A060412 [From Roosendaal web site]


EXAMPLE

1: 0 steps
2 1: 1 step
3 10 5 16 8 4 2 1: 6 steps (before it drops below n)
4 2 1: 1 step
5 16 8 4 2 1: 3 steps
6 3 ...: 1 step
7 22 11 34 17 52 26 13 40 20 10 5 ...: 11 steps
...
Records: 0.1.6.11.96.132...171... (A217934)
at.......1.2.3..7.27.703.10087... (A060412)


MATHEMATICA

Prepend[Table[Length[NestWhileList[If[EvenQ[#], #/2, 3#+1]&, n, #>=n&]], {n, 2, 99}], 1]1 (* Jayanta Basu, May 28 2013 *)


PROG

(Python)
def a(n):
if n<3: return n  1
N=n
x=0
while True:
if n%2==0: n/=2
else: n = 3*n + 1
x+=1
if n<N: return x
print [a(n) for n in range(1, 101)] # Indranil Ghosh, Apr 22 2017


CROSSREFS

Cf. A060445, A074473, A126241.
For records see A060412, A217934.  N. J. A. Sloane, Oct 20 2012
Sequence in context: A152935 A253686 A290101 * A074193 A074453 A069608
Adjacent sequences: A102416 A102417 A102418 * A102420 A102421 A102422


KEYWORD

nonn,changed


AUTHOR

N. J. A. Sloane, Sep 15 2006


STATUS

approved



