OFFSET
0,1
REFERENCES
R. K. Guy, Unsolved Problems in Number Theory, E16.
LINKS
FORMULA
a(n) = A008874(n + 2).
MAPLE
f := proc(n) option remember; if n = 0 then 95; elif f(n-1) mod 2 = 0 then f(n-1)/2 else 3*f(n-1)+1; fi; end;
MATHEMATICA
NestList[If[EvenQ[#], #/2, 3#+1]&, 95, 60] (* Harvey P. Dale, Dec 02 2012 *)
PROG
(Haskell)
a008875 n = a008875_list !! n
a008875_list = drop 2 a008874_list
-- Reinhard Zumkeller, Aug 30 2012
(Magma) [n eq 1 select 95 else IsOdd(Self(n-1)) select 3*Self(n-1)+1 else Self(n-1) div 2: n in [1..70]]; // Vincenzo Librandi, Jul 29 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Apr 27 2001
STATUS
approved