cp's OEIS Frontend

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.

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.

Original entry on oeis.org

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, 126, 17, 55, 26, 1107, 30, 51, 31, 131, 36, 46, 29, 375, 37, 44, 39, 123, 40, 42, 35, 3285, 57, 24, 135, 81, 405, 82, 38, 19, 132, 53, 1134, 84, 25, 134, 85, 23, 378
Offset: 0

Views

Author

Rémy Sigrist, Dec 21 2023

Keywords

Comments

Two integers can be added without carries in balanced ternary if they have no equal nonzero digit at the same position.
If we restrict ourselves to positive integers and allow duplicates, then we obtain A236313.
This sequence can be seen as a variant of A278742; however, the present sequence is not strictly increasing.
Will every nonnegative integer appear in the sequence?

Examples

			The first terms, alongside the balanced ternary expansions of a(n) and b(n) = Sum_{k = 0..n-1} a(k), are:
  n           |  0  1   2    3    4     5     6     7      8      9     10
  a(n)        |  0  1   2    5    3    15     4     6     41      9     18
  bter(b(n))  |  0  0   1   10  10T   11T  100T  1010   1100  100TT  101TT
  bter(a(n))  |  0  1  1T  1TT   10  1TT0    11   1T0  1TTTT    100   1T00
		

Crossrefs

Programs

  • PARI
    See Links section.