A328147 a(n) = A025586(n)/4 for n>=3.
4, 1, 4, 4, 13, 2, 13, 4, 13, 4, 10, 13, 40, 4, 13, 13, 22, 5, 16, 13, 40, 6, 22, 10, 2308, 13, 22, 40, 2308, 8, 25, 13, 40, 13, 28, 22, 76, 10, 2308, 16, 49, 13, 34, 40, 2308, 12, 37, 22, 58, 13, 40, 2308, 2308, 14, 49, 22, 76, 40, 46, 2308, 2308, 16, 49, 25, 76, 17, 52, 40, 2308, 18, 2308, 28, 85, 22, 58, 76, 202, 20, 61, 2308, 2308, 21, 64, 49, 148, 22, 76, 34, 2308, 40, 70, 2308, 2308, 24, 2308, 37, 112
Offset: 3
Keywords
Examples
For n=3, the Collatz sequence is 3,10,5,16,8,4,2,1. The largest term is 16, so a(3) = 16/4 = 4.
Crossrefs
Cf. A025586.
Programs
-
Python
def a(n): if n<3: return 0 l=[n, ] while True: if n%2==0: n/=2 else: n = 3*n + 1 if not n in l: l+=[n, ] if n<2: break else: break return max(l)/4
Extensions
a(1)-a(2) removed from data by Michel Marcus, Nov 02 2020
Comments