A368225 Irregular table of nonnegative integers read by rows: the 1's in the binary expansion of n exactly match the nonzero digits in the balanced ternary expansions of the terms in the n-th row.
0, 1, 3, 2, 4, 9, 8, 10, 6, 12, 5, 7, 11, 13, 27, 26, 28, 24, 30, 23, 25, 29, 31, 18, 36, 17, 19, 35, 37, 15, 21, 33, 39, 14, 16, 20, 22, 32, 34, 38, 40, 81, 80, 82, 78, 84, 77, 79, 83, 85, 72, 90, 71, 73, 89, 91, 69, 75, 87, 93, 68, 70, 74, 76, 86, 88, 92, 94
Offset: 0
Examples
Table T(n, k) begins: 0; 1; 3; 2, 4; 9; 8, 10; 6, 12; 5, 7, 11, 13; 27; 26, 28; 24, 30; 23, 25, 29, 31; 18, 36; 17, 19, 35, 37; 15, 21, 33, 39; 14, 16, 20, 22, 32, 34, 38, 40; 81; ...
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..9841 (rows for n = 0..2^9-1 flattened)
- Index entries for sequences that are permutations of the natural numbers
Crossrefs
Programs
-
PARI
row(n) = { my (r = [sign(n)], b = binary(n)); for (k = 2, #b, r = [3*v+b[k]|v<-r]; if (b[k], r = concat(r, [v-2|v<-r]););); Set(r); }
Comments