OFFSET
0,2
COMMENTS
For all n, it appears that a(n) <= 37n. For n > 22, it appears that a(n) < 16n. - T. D. Noe, Feb 02 2007
This sequence contains some unusually long runs of values that differ by 1. - Dmitry Kamenetsky, Dec 09 2016
LINKS
T. D. Noe, Table of n, a(n) for n = 0..2000
EXAMPLE
For n=4, 3^4 = 81, and the Collatz sequence (3x + 1 if odd, x/2 if even) goes 81, 244, 122, 61, 184, 92, 46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1. This is 22 steps, so a(4) = 22. - Michael B. Porter, Dec 15 2016
MATHEMATICA
Table[Length[NestWhileList[If[EvenQ[#], #/2, 3#+1]&, 3^n, #>1&]]-1, {n, 0, 60}] (* Harvey P. Dale, Oct 13 2011 *)
PROG
(PARI) for(n=2, 100, s=3^n; t=0; while(s!=1, t++; if(s%2==0, s=s/2, s=3*s+1); if(s==1, print1(t, ", "); ); ))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, May 17 2002
STATUS
approved