OFFSET
1,2
COMMENTS
Recall that f(n) = n/2 if n is even; = 3n + 1 if n is odd.
LINKS
Karl-Heinz Hofmann, Table of n, a(n) for n = 1..255
EXAMPLE
28, 29, 30 is the first chain of three consecutive positive integers n, n+1, n+2 such that h(n) = h(n+1) = h(n+2). Hence a(3)=28.
MATHEMATICA
t = Differences@ Table[Length@ NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, n, # != 1 &], {n, 10^5}]; {1}~Join~Table[SequencePosition[t, ConstantArray[0, n - 1]][[1, 1]], {n, 2, 25}] (* Michael De Vlieger, Sep 14 2016, Version 10.1 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Joseph L. Pe, Dec 31 2002
EXTENSIONS
More terms from Michel ten Voorde Jun 20 2003
a(18)-a(21) corrected and a(22)-a(54) from Donovan Johnson, Nov 14 2010
a(1)=1 prepended by Dmitry Kamenetsky, Sep 14 2016
STATUS
approved