%I #52 Mar 15 2022 08:21:17
%S 2,1,6,8,5,3,4,10,14,9,12,16,18,24,32,21,28,22,26,17,11,7,30,40,34,38,
%T 25,42,56,37,46,50,33,44,29,19,54,72,96,128,85,58,62,41,27,36,48,64,
%U 66,88,70,74,49,78,104,69,92,61,82,86,57,76,90,120,160,94,98,65,43
%N All positive integer solutions m of equation A342369^k(6*p - 2) = m*3 + 2, sorted by p and k in ascending order, p has higher priority than k. p and k are positive integers. "^k" means recursion here.
%C It is conjectured that this sequence is a permutation of the positive integers. If it does not contain all positive integers, then there exists a number of the form q = p*6 - 2, where no solution for j*3 - 1 = A006370^k(q) can be found for any j and any k. Such an example is not yet known.
%C If the sequence were to contain a positive integer more than once, this would mean that A340407 contains a term of uncountable size, which is not the case.
%C Let us assume here that this sequence is a permutation, then let a'(m) be the inverse permutation, such that a'(a(n)) = n.
%C Let p = A006370^k(6*(a(n) + 1) - 2) and choose k such that p is of the form m*6 + 4, then a'((p + 2)/6 - 1) < n.
%C Infinitely many formulas can be developed from this template: a(Sum_{k=1..3^d*n - b} A340407(k) + c) = e*n - f. c is here in the range 0 to d-1 if d-1 > 0. b can be any element of row d in A342261. For all combinations of d, b and c we may find a suitable e and f.
%H <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>
%F a(1 + Sum_{k=1..n-1} A340407(k)) = 4*n-2.
%F a(Sum_{k=1..9*n-8} A340407(k)) = 24*n-23.
%F a(Sum_{k=1..9*n-1} A340407(k)) = 48*n-8.
%F a(n) = 8*(10^m - 1)/3 + 1 if n = Sum_{k=1..10^m} A340407(k).
%F a(n) = 4*10^m - 2 if n = -1 + Sum_{k=1..10^m} A340407(k).
%F a(n) = 4*10^m - 6 if n = -2 + Sum_{k=1..10^m} A340407(k).
%F a(n) = 5*10^m + (10^(n - 1) - 1)/3 - 13
%F if n = -3 + Sum_{k=1..10^m} A340407(k).
%F a(n) = 4*10^m - 10 if n = -4 + Sum_{k=1..10^m} A340407(k).
%o (MATLAB)
%o function a = A342842( max_p )
%o c = 1;
%o for p = 1:max_p
%o s = 6*p -2;
%o while mod(s,3) ~= 0
%o s = A342369( s );
%o if mod(s,3) == 2
%o a(c) = (s-2)/3;
%o c = c+1;
%o end
%o end
%o end
%o end
%o function b = A342369( n )
%o if mod(n,3) == 2
%o b = (2*n - 1)/3;
%o else
%o b = 2*n;
%o end
%o end
%Y Cf. A342369, A340407, A006370, A342261.
%K nonn
%O 1,1
%A _Thomas Scheuerle_, Mar 24 2021