%I #17 May 04 2024 11:58:25
%S 1,2,3,4,4,4,4,6,4,4,5,6,4,6,4,6,4,6,4,4,6,4,4,6,4,4,6,6,4,4,6,6,4,4,
%T 4,6,6,7,4,4,6,6,7,4,4,6,6,6,6,4,4,6,4,6,6,6,7,4,4,4,6,4,6,4,6,4,4,4,
%U 6,4,6,6,6,6,4,9,4,6,4,6,6,6,6,6,4,6,4,6,4,4,4,6,4,4,6,4,6,6,4,6,9,4,4,6,4,4,8,6
%N a(n) = k, if A086893(k) is the first term of A086893 reached on the trajectory of reduced Collatz-function R, when starting from 2n-1, or -1 if no term of A086893 is ever encountered.
%C The length of the binary expansion of the first term of A086893 that comes along when starting from x = 2*n-1 and then repeating the operation x -> A000265(3*x+1). If 2n-1 itself is in A086893, then its binary length is used.
%C Terms A016789(n) = 2, 5, 8, 11, 14, 17, ... occur only once in this sequence because A086893(A016789(n)) are all multiples of 3: 3, 21, 213, 1365, 13653, 87381, 873813, 5592405, 55924053, 357913941, ..., while the terms of A075677 never are. Note that all terms > 1 of A086893 are just one or two invocations of R away from 1.
%H Antti Karttunen, <a href="/A372450/b372450.txt">Table of n, a(n) for n = 1..100000</a>
%H <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>
%e a(11) = 5 because the first term of A086893 that occurs on the trajectory of 21 (= 2*11-1) is 21 = A086893(5).
%e a(14) = 6 because the first term of A086893 that occurs on the trajectory of 27 (= 2*14-1) is A372443(39) = 53 = A086893(6).
%o (PARI)
%o A000265(n) = (n>>valuation(n,2));
%o A000523(n) = logint(n,2);
%o A086893(n) = (if(n%2, 2^(n+1), 2^(n+1)+2^(n-1))\3);
%o A372358(n) = bitxor(n, A086893(1+A000523(n)));
%o A372450(n) = { n=2*n-1; while(A372358(n)>0, n=A000265(3*n+1)); (1+A000523(n)); };
%Y Cf. A000265, A000523, A016789, A075677, A086893, A372358, A372443.
%K nonn
%O 1,2
%A _Antti Karttunen_, May 03 2024