OFFSET
1,3
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = Sum_{i=0..n} A006577(i).
MATHEMATICA
A006577[n_] := Length[NestWhileList[If[OddQ[#], 3*# + 1, #/2] &, n, # > 1 &]] - 1;
Accumulate[Array[A006577, 100]] (* Paolo Xausa, Oct 01 2024 *)
PROG
(PARI) A006577(n)=if(n<0, 0, s=n; c=0; while(s>1, s=if(s%2, 3*s+1, s/2); c++); c)
s=0; vector(100, n, s+=A006577(n) ) \\ Charles R Greathouse IV, May 11 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Goldberg (felixg(AT)tx.technion.ac.il), Dec 26 2000
STATUS
approved