login
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).
9
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
OFFSET
1,3
LINKS
Eric Roosendaal, On the 3x + 1 problem
N. J. A. Sloane, First 36 terms of A217934 and A060412 [From Roosendaal web site]
FORMULA
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
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
For records see A060412, A217934. - N. J. A. Sloane, Oct 20 2012
Sequence in context: A152935 A253686 A290101 * A352891 A339387 A074193
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Sep 15 2006
STATUS
approved