%I #12 Dec 19 2023 12:52:17
%S 0,1,2,3,6,4,5,7,8,9,18,10,11,19,20,12,15,21,24,13,14,16,17,22,23,25,
%T 26,27,54,28,29,55,56,30,33,57,60,31,32,34,35,58,59,61,62,36,45,63,72,
%U 37,38,46,47,64,65,73,74,39,42,48,51,66,69,75,78
%N Irregular table of nonnegative integers T(n, k), n >= 0, k = 1..A001316(n), read by rows: the 1's in the binary expansion of n exactly match the nonzero digits in the ternary expansions of the terms in the n-th row.
%C As a flat sequence, this is a permutation of the nonnegative integers (with inverse A368230).
%H Rémy Sigrist, <a href="/A368229/b368229.txt">Table of n, a(n) for n = 0..6560</a> (rows for n = 0..2^8-1 flattened)
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F T(n, 1) = A005836(n + 1).
%F T(n, A001316(n)) = A005823(n + 1).
%F A289831(T(n, k)) = n.
%e Table T(n, k) begins:
%e 0;
%e 1, 2;
%e 3, 6;
%e 4, 5, 7, 8;
%e 9, 18;
%e 10, 11, 19, 20;
%e 12, 15, 21, 24;
%e 13, 14, 16, 17, 22, 23, 25, 26;
%e 27, 54;
%e 28, 29, 55, 56;
%e 30, 33, 57, 60;
%e 31, 32, 34, 35, 58, 59, 61, 62;
%e 36, 45, 63, 72;
%e 37, 38, 46, 47, 64, 65, 73, 74;
%e 39, 42, 48, 51, 66, 69, 75, 78;
%e 40, 41, 43, 44, 49, 50, 52, 53, 67, 68, 70, 71, 76, 77, 79, 80;
%e 81, 162;
%e ...
%o (PARI) row(n) = { my (r = [0], b = binary(n)); for (k = 1, #b, r = [3*v+b[k]|v<-r]; if (b[k], r = concat(r, [v+1|v<-r]););); Set(r); }
%Y See A368225 for a similar sequence.
%Y Cf. A001316, A005823, A005836, A289831, A368230 (inverse).
%K nonn,tabf,base
%O 0,3
%A _Rémy Sigrist_, Dec 18 2023
|