A343605 a(n) is the greatest number < n with the same sum of balanced ternary digits as n.
-2, -5, 0, 1, -14, -1, 2, 3, 6, 7, 4, 9, 10, -41, -4, 5, 8, 15, 16, 11, 18, 19, 12, 17, 20, 21, 24, 25, 22, 27, 28, 13, 26, 29, 30, 33, 34, 31, 36, 37, -122, -13, 14, 23, 42, 43, 32, 45, 46, 35, 44, 47, 48, 51, 52, 49, 54, 55, 38, 53, 56, 57, 60, 61, 58, 63
Offset: 0
Examples
The first terms, in base 10 and in balanced ternary (where T denotes the digit -1), alongside A065363(n), are: n a(n) bter(n) bter(a(n)) A065363(n) -- ---- ------- ---------- ---------- 0 -2 0 T1 0 1 -5 1 T11 1 2 0 1T 0 0 3 1 10 1 1 4 -14 11 T111 2 5 -1 1TT T -1 6 2 1T0 1T 0 7 3 1T1 10 1 8 6 10T 1T0 0 9 7 100 1T1 1 10 4 101 11 2 11 9 11T 100 1 12 10 110 101 2
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..10000
Comments