This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A368225 #16 Dec 19 2023 16:50:03 %S A368225 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, %T A368225 19,35,37,15,21,33,39,14,16,20,22,32,34,38,40,81,80,82,78,84,77,79,83, %U A368225 85,72,90,71,73,89,91,69,75,87,93,68,70,74,76,86,88,92,94 %N 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. %C A368225 As a flat sequence, this is a permutation of the nonnegative integers with inverse A368226 and infinitely many fixed points (see Formula section). %C A368225 Row 0 has one term, and for n > 0, row n has A048896(n-1) terms. %C A368225 For any n >= 0, row n ends with A005836(n+1). %H A368225 Rémy Sigrist, <a href="/A368225/b368225.txt">Table of n, a(n) for n = 0..9841</a> (rows for n = 0..2^9-1 flattened) %H A368225 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A368225 A343231(T(n, k)) = n. %F A368225 a(m) = m for any m in A003462. %e A368225 Table T(n, k) begins: %e A368225 0; %e A368225 1; %e A368225 3; %e A368225 2, 4; %e A368225 9; %e A368225 8, 10; %e A368225 6, 12; %e A368225 5, 7, 11, 13; %e A368225 27; %e A368225 26, 28; %e A368225 24, 30; %e A368225 23, 25, 29, 31; %e A368225 18, 36; %e A368225 17, 19, 35, 37; %e A368225 15, 21, 33, 39; %e A368225 14, 16, 20, 22, 32, 34, 38, 40; %e A368225 81; %e A368225 ... %o A368225 (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); } %Y A368225 See A368229 and A368239 for similar sequences. %Y A368225 Cf. A003462, A005836, A048896, A343231, A353662, A368226 (inverse). %K A368225 nonn,tabf,base %O A368225 0,3 %A A368225 _Rémy Sigrist_, Dec 18 2023