A368229 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.
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, 26, 27, 54, 28, 29, 55, 56, 30, 33, 57, 60, 31, 32, 34, 35, 58, 59, 61, 62, 36, 45, 63, 72, 37, 38, 46, 47, 64, 65, 73, 74, 39, 42, 48, 51, 66, 69, 75, 78
Offset: 0
Examples
Table T(n, k) begins: 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, 26; 27, 54; 28, 29, 55, 56; 30, 33, 57, 60; 31, 32, 34, 35, 58, 59, 61, 62; 36, 45, 63, 72; 37, 38, 46, 47, 64, 65, 73, 74; 39, 42, 48, 51, 66, 69, 75, 78; 40, 41, 43, 44, 49, 50, 52, 53, 67, 68, 70, 71, 76, 77, 79, 80; 81, 162; ...
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..6560 (rows for n = 0..2^8-1 flattened)
- Index entries for sequences that are permutations of the natural numbers
Crossrefs
Programs
-
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); }
Comments