%I #29 Aug 31 2021 02:43:40
%S 0,0,10,0,4,11,58,0,84,4,40,12,12,62,47,0,25,89,89,4,6,43,36,13,117,
%T 13,3395,66,66,49,3064,0,148,27,21,94,94,94,286,4,3246,6,184,46,42,39,
%U 2924,14,122,122,120,14,14,3435,3374,70,231,70,247,51,63,3101
%N Assuming the truth of the Collatz conjecture, let T(n,i), i = 1..k be the initial k elements of the Collatz trajectory of n, up to when the first 1 appears, but excluding the 1. a(n) is the number of ordered pairs T(n,i) < T(n,j) such that gcd(T(n,i), T(n,j)) = 1.
%C If the number 1 of the Collatz trajectory is included, we obtain the new sequence b(n) = a(n) + A006577(n).
%C We observe interesting properties for the even and odd values of a(n).
%C First case: a(n) = 0, 4, 6, ..., 2i, ...
%C When a(n) = q even, there exists a subset N(q) = {n_1, n_2, ...} such that a(n_i) = q for i = 1, 2, ... We observe that N(q) = N1(q) union N2(q) (see the table below). Conjecturally, for n = 12, 14, 16, ... N1(q) is finite and the last two elements of the set N1(q) are of the form x and x+1.
%C The elements of N2(q) are of the form {((4^m - 1)/3)*2^k}, k = 0, 1, ... with m = a(n)/2. The set N2(q) is infinite.
%C Second case: a(n) = 11, 13, 15, ...
%C Conjecturally, N1(q) is finite and the last two elements of the set N1(q) are of the form y and y+2.
%C Conjecture: N2(q) = { }.
%C The following table gives the first 17 values of a(n) in ascending order with the corresponding subsets N1(q) and N2(q).
%C +----+--------------------------------------------------------------------+
%C |a(n)| N1(a(n)) |
%C +----+--------------------------------------------------------------------+
%C | 0 |{ } |
%C | 4 |{ } |
%C | 6 |{ } |
%C | 8 |{ } |
%C | 10 |{3} |
%C | 11 |{6} |
%C | 12 |{12, 13} |
%C | 13 |{24, 26} |
%C | 14 |{48, 52, 53} |
%C | 15 |{96, 104, 106} |
%C | 16 |{192, 208, 212, 213} |
%C | 17 |{384, 416, 424, 426} |
%C | 18 |{768, 832, 848, 852, 853} |
%C | 19 |{113, 1536, 1664, 1696, 1704, 706} |
%C | 20 |{226, 3072, 3328, 3392, 3408, 3412, 3413} |
%C | 21 |{35, 452, 453, 6144, 6656, 6784, 6816, 6824, 6826} |
%C | 22 |{70, 227, 904, 906, 12288, 13312, 13568, 13632, 13648, 13652, 13653}|
%C +----+--------------------------------------------------------------------+
%C +----+--------------------------------------------------------------------+
%C |a(n)| N2(a(n)) |
%C +----+--------------------------------------------------------------------+
%C | 0 |{1, 2, 4, 8, 16, 32, ..., 2^k, ... } (A000079) |
%C | 4 |{5, 10, 20, 40, 80, ..., 5*2^k, ...} (A020714) |
%C | 6 |{21, 42, 84, 168, 336, 672, ..., ((4^3 - 1)/3)*2^k, ...} (A175805) |
%C | 8 |{85, 170, 340, 680, ..., ((4^4 - 1)/3)*2^k, ...} |
%C | 10 |{341, 682, 1364, 2728, ..., ((4^5 - 1)/3)*2^k, ...} |
%C | 11 | { } |
%C | 12 |{1365, 2730, 5460, ...,((4^6 - 1)/3)*2^k, ...} |
%C | 13 | { } |
%C | 14 |{5461, 10922, ..., ((4^7 - 1)/3)*2^k, ...} |
%C | 15 | { } |
%C | 16 |{21845, 43690, ...,((4^8 - 1)/3)*2^k, ...} |
%C | 17 | { } |
%C | 18 |{87381, 174762, ...,((4^9 - 1)/3)*2^k, ...} |
%C | 19 | { } |
%C | 20 |{349525, 699050, ..., ((4^10 - 1)/3)*2^k, ...} |
%C | 21 | { } |
%C | 22 |{1398101, 2796202, ..., ((4^11 - 1)/3)*2^k, ...} |
%C +----+--------------------------------------------------------------------+
%H <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>
%e a(3) = 10 because the Collatz trajectory T(3,i) of 3 up to the number 1 is 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 and gcd(T(i), T(j)) = 1 for the 10 following pairs of elements of T: (2, 3), (2, 5), (3, 4), (3, 5), (3, 8), (3, 10), (3, 16), (4, 5), (5, 8) and (5, 16). 28
%e In the general case, a(n) = 10 for n in the set {3} union {341, 682, 1364, 2728, ...,((4^5 - 1)/3)*2^k, ...} with k = 0, 1, 2, ...
%e a(6) = 11 because the Collatz trajectory T(6,i) of 6 up to the number 1 is 6 -> 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 and gcd(T(i), T(j)) = 1 for the 11 following pairs of elements of T: (2, 3), (2, 5), (3, 4), (3, 5), (3, 8), (3, 10), (3, 16), (4, 5), (5, 6), (5, 8) and (5, 16).
%p nn:=1000:
%p for n from 1 to 200 do:
%p m:=n:lst:={}:
%p for i from 1 to nn while(m<>1) do:
%p if irem(m, 2)=0
%p then
%p lst:=lst union {m}:m:=m/2:
%p else
%p lst:=lst union {m}:m:=3*m+1:
%p fi:
%p od:
%p n0:=nops(lst):it:=0:
%p for j from 1 to n0-1 do:
%p for k from j+1 to n0 do:
%p if gcd(lst[j],lst[k])=1
%p then
%p it:=it+1:
%p else fi:
%p od:
%p od:
%p printf(`%d, `,it):
%p od:
%Y Cf. A000079, A002450, A006370, A006577, A020714, A175805.
%K nonn
%O 1,3
%A _Michel Lagneau_, Oct 08 2018
%E Definition revised by _N. J. A. Sloane_, Nov 12 2018