%I #24 Aug 28 2021 02:52:50
%S 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,
%T 13,22,40,2308,8,25,13,40,13,28,22,76,10,2308,16,49,13,34,40,2308,12,
%U 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
%N a(n) = A025586(n)/4 for n>=3.
%C This sequence factors out the 4 that all of the terms of A025586 for n>2 are divisible by.
%e 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.
%o (Python)
%o def a(n):
%o if n<3: return 0
%o l=[n, ]
%o while True:
%o if n%2==0: n/=2
%o else: n = 3*n + 1
%o if not n in l:
%o l+=[n, ]
%o if n<2: break
%o else: break
%o return max(l)/4
%Y Cf. A025586.
%K nonn
%O 3,1
%A _P. Michael Hutchins_, Oct 22 2019
%E a(1)-a(2) removed from data by _Michel Marcus_, Nov 02 2020
|