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 A371267 #15 Apr 01 2024 12:09:40 %S A371267 0,1,3,2,4,9,10,8,7,5,6,12,11,13,27,28,26,30,31,29,25,24,23,22,21,20, %T A371267 16,14,15,19,17,18,36,37,35,34,32,33,39,38,40,81,82,80,84,85,83,79,78, %U A371267 77,90,91,89,93,94,92,88,87,86,76,75,74,73,72,71,70,69,68 %N A371267 Lexicographically latest sequence of distinct nonnegative integers such that the run lengths transforms of the balanced ternary expansions of n and of a(n) are the same. %C A371267 This sequence is a self-inverse permutation of the nonnegative integers. %H A371267 Rémy Sigrist, <a href="/A371267/b371267.txt">Table of n, a(n) for n = 0..9841</a> %H A371267 Rémy Sigrist, <a href="/A371267/a371267.gp.txt">PARI program</a> %H A371267 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A371267 A371263(a(n)) = A371263(n). %F A371267 a(n) = n iff n belongs to A003462. %e A371267 The first terms, in decimal and in balanced ternary, are: %e A371267 n a(n) bter(n) bter(a(n)) %e A371267 -- ---- ------- ---------- %e A371267 0 0 0 0 %e A371267 1 1 1 1 %e A371267 2 3 1T 10 %e A371267 3 2 10 1T %e A371267 4 4 11 11 %e A371267 5 9 1TT 100 %e A371267 6 10 1T0 101 %e A371267 7 8 1T1 10T %e A371267 8 7 10T 1T1 %e A371267 9 5 100 1TT %e A371267 10 6 101 1T0 %e A371267 11 12 11T 110 %e A371267 12 11 110 11T %e A371267 13 13 111 111 %e A371267 14 27 1TTT 1000 %e A371267 15 28 1TT0 1001 %o A371267 (PARI) \\ See Links section. %Y A371267 See A371261 for a similar sequence. %Y A371267 Cf. A003462 (fixed points), A371263. %K A371267 nonn,base %O A371267 0,3 %A A371267 _Rémy Sigrist_, Mar 16 2024