OFFSET
1,1
COMMENTS
Note that a(n) <= prime(n). The following primes require the maximum number of iterations: 2, 3, 7, 19, 37, 43, 73, 109, 127,...
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
MATHEMATICA
Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Table[p = Prime[n]; k = 1; While[Select[Collatz[k], Mod[#, p] == 0 &] == {}, k++]; k, {n, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Feb 22 2013
STATUS
approved