A361747 Lexicographically earliest sequence of distinct positive integers such that a(n) and a(n-1) share at least one identical trit at the same position in their balanced ternary representations.
1, 4, 2, 3, 6, 5, 7, 8, 9, 10, 11, 12, 13, 16, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67
Offset: 1
Examples
Table of initial terms (T is a digit of the value -1): n | a(n) | BAL ---+------+------- 1 | 1 | 1 2 | 4 | 11 3 | 2 | 1T 4 | 3 | 10 5 | 6 | 1T0 6 | 5 | 1TT 7 | 7 | 1T1 8 | 8 | 10T 9 | 9 | 100 10 | 10 | 101 11 | 11 | 11T 12 | 12 | 110 13 | 13 | 111 14 | 16 | 1TT1 15 | 14 | 1TTT 16 | 15 | 1TT0 17 | 17 | 1T0T 18 | 18 | 1T00 19 | 19 | 1T01 20 | 20 | 1T1T
Comments