OFFSET
0,2
COMMENTS
Has at least two periodic orbits, {1,8,4,2} and {5,20,10}.
Four others are {19,62,31,98,49,152,76,38}, {23,74,37,116,58,29,92,46}, {187,...} and {347,...}. The last two are each of length 44, peaking with 8324 and 10196 respectively. - Geoffrey H. Morley, Mar 14 2013
REFERENCES
J. C. Lagarias, ed., The Ultimate Challenge: The 3x+1 Problem, Amer. Math. Soc., 2010. See p. 307.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..2000
Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1).
FORMULA
G.f.: -x*(-8 - x + 2*x^2) / ( (x-1)^2*(1+x)^2 ). - R. J. Mathar, Mar 10 2011
MAPLE
f:=n->if n mod 2 = 0 then n/2 else 3*x+5 fi;
MATHEMATICA
Table[If[EvenQ[n], n/2, 3n+5], {n, 0, 80}] (* Harvey P. Dale, Nov 25 2023 *)
PROG
(Magma) [(7*n+10-10*(-1)^n*(n/2+1))/4: n in [0..80]]; // Vincenzo Librandi, May 24 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jan 31 2011
STATUS
approved