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 A368316 #9 Dec 24 2023 09:37:20 %S A368316 0,1,2,5,3,15,4,6,41,9,18,10,125,12,16,8,45,13,14,369,27,54,28,11,7, %T A368316 126,17,55,26,1107,30,51,31,131,36,46,29,375,37,44,39,123,40,42,35, %U A368316 3285,57,24,135,81,405,82,38,19,132,53,1134,84,25,134,85,23,378 %N A368316 Lexicographically earliest sequence of distinct nonnegative integers such that for any n >= 0, a(n) and Sum_{k = 0..n-1} a(k) can be added without carries in balanced ternary. %C A368316 Two integers can be added without carries in balanced ternary if they have no equal nonzero digit at the same position. %C A368316 If we restrict ourselves to positive integers and allow duplicates, then we obtain A236313. %C A368316 This sequence can be seen as a variant of A278742; however, the present sequence is not strictly increasing. %C A368316 Will every nonnegative integer appear in the sequence? %H A368316 Rémy Sigrist, <a href="/A368316/a368316.gp.txt">PARI program</a> %H A368316 Wikipedia, <a href="https://en.wikipedia.org/wiki/Balanced_ternary">Balanced ternary</a> %e A368316 The first terms, alongside the balanced ternary expansions of a(n) and b(n) = Sum_{k = 0..n-1} a(k), are: %e A368316 n | 0 1 2 3 4 5 6 7 8 9 10 %e A368316 a(n) | 0 1 2 5 3 15 4 6 41 9 18 %e A368316 bter(b(n)) | 0 0 1 10 10T 11T 100T 1010 1100 100TT 101TT %e A368316 bter(a(n)) | 0 1 1T 1TT 10 1TT0 11 1T0 1TTTT 100 1T00 %o A368316 (PARI) See Links section. %Y A368316 Cf. A236313, A278742. %K A368316 nonn,base %O A368316 0,3 %A A368316 _Rémy Sigrist_, Dec 21 2023