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 A380180 #9 Jan 17 2025 16:31:51 %S A380180 0,0,1,-1,0,2,3,0,3,0,1,3,4,-4,-3,-1,0,5,6,8,9,-3,0,6,9,-3,-2,0,1,6,7, %T A380180 9,10,-1,0,8,9,0,9,0,1,9,10,-1,0,2,3,8,9,11,12,0,3,9,12,0,1,3,4,9,10, %U A380180 12,13,-13,-12,-10,-9,-4,-3,-1,0,14,15,17,18,23,24,26,27 %N A380180 Irregular table T(n, k), n >= 0, k = 1..2^A005812(n); the n-th row lists the integers m (possibly negative) such that the nonzero digits in the balanced ternary expansion of m appear in the balanced ternary expansion of n. %C A380180 Every integer appears infinitely many times in the sequence. %C A380180 See A368239 (resp. A380181) for the nonnegative values (resp. the nonpositive values, negated) in order of appearance in the present sequence. %H A380180 Rémy Sigrist, <a href="/A380180/b380180.txt">Table of n, a(n) for n = 0..4688</a> (rows for n = 0..3^5 flattened) %H A380180 Wikipedia, <a href="https://en.wikipedia.org/wiki/Balanced_ternary">Balanced ternary</a> %F A380180 T(n, 1) = - A060373(n). %F A380180 T(n, 2^A005812(n)) = A060372(n). %e A380180 Irregular table T(n, k) begins: %e A380180 n n-th row %e A380180 -- ------------------------- %e A380180 0 0 %e A380180 1 0, 1 %e A380180 2 -1, 0, 2, 3 %e A380180 3 0, 3 %e A380180 4 0, 1, 3, 4 %e A380180 5 -4, -3, -1, 0, 5, 6, 8, 9 %e A380180 6 -3, 0, 6, 9 %e A380180 7 -3, -2, 0, 1, 6, 7, 9, 10 %e A380180 8 -1, 0, 8, 9 %e A380180 9 0, 9 %e A380180 10 0, 1, 9, 10 %e A380180 11 -1, 0, 2, 3, 8, 9, 11, 12 %e A380180 12 0, 3, 9, 12 %e A380180 . %e A380180 Irregular table T(n, k) begins in balanced ternary: %e A380180 n n-th row %e A380180 --- -------------------------------- %e A380180 0 0 %e A380180 1 0, 1 %e A380180 1T T, 0, 1T, 10 %e A380180 10 0, 10 %e A380180 11 0, 1, 10, 11 %e A380180 1TT TT, T0, T, 0, 1TT, 1T0, 10T, 100 %e A380180 1T0 T0, 0, 1T0, 100 %e A380180 1T1 T0, T1, 0, 1, 1T0, 1T1, 100, 101 %e A380180 10T T, 0, 10T, 100 %e A380180 100 0, 100 %e A380180 101 0, 1, 100, 101 %e A380180 11T T, 0, 1T, 10, 10T, 100, 11T, 110 %e A380180 110 0, 10, 100, 110 %o A380180 (PARI) row(n) = { my (r = [0], d, t = 1); while (n, d = centerlift(Mod(n, 3)); if (d, r = concat(r, [v + d*t | v <- r]);); n = (n-d)/3; t *= 3;); vecsort(r); } %Y A380180 See A380123 for a similar sequence. %Y A380180 Cf. A005812, A060372, A060373, A368239, A380181. %K A380180 sign,base,tabf %O A380180 0,6 %A A380180 _Rémy Sigrist_, Jan 15 2025