OFFSET
1,3
COMMENTS
The sequence contains mysterious duplicates of terms, sometimes in groups of 2 to 4 at a time, but I haven't seen any cyclic patterns, it's all unique.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = 1 + min(a(C(n)), a(C(C(n)))), where C(n) = A006370(n).
EXAMPLE
a(n) values frequently depend on both lesser and higher terms:
a(3)= 1+ min( a(C(3)), a(C(C(3)))) = 4
a(3)= 1+ min( a(10), a(5))= 1+min(4,3) = 4
a(10)=1+ min( a(5), a(16))= 1+min(3,3) = 4
a(5) =1+ min( a(16),a(8)) = 1+min(3,2) = 3
a(16)=1+ min( a(8), a(4)) = 1+min(2,2) = 3
a(8) =1+ min( a(4), a(2)) = 1+min(1,1) = 2
a(4) =1+ min( a(2), a(1)) = 1+min(1,1) = 2
a(2) =1 (starting value)
PROG
(PARI) C(n)=if(n%2, 3*n+1, n/2)
A=vector(10^4); A[1]=A[2]=1;
a(n)=if(n<=#A && A[n], A[n], my(c=C(n), t=min(a(c), a(C(c)))+1); if(n>#A, t, A[n]=t)) \\ Charles R Greathouse IV, Jun 24 2013
(Blitz3D) function A(n)
if n=1 or 2
return 1
else
return 1 +lesser(A(C(n)), A(C(C(n))))
end if
end function
; The Collatz Sequence generator equation
Function C(n)
If n Mod 2
Return 3*n+1
Else
Return n Shr 1
End If
End Function
;; Andres M. Torres, Jun 26 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Andres M. Torres, Jun 22 2013
STATUS
approved