OFFSET
3,1
COMMENTS
This sequence factors out the 4 that all of the terms of A025586 for n>2 are divisible by.
EXAMPLE
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.
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
P. Michael Hutchins, Oct 22 2019
EXTENSIONS
a(1)-a(2) removed from data by Michel Marcus, Nov 02 2020
STATUS
approved