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.

A358915 a(n) is the far-difference representation of n written in balanced ternary.

Original entry on oeis.org

0, 1, 3, 9, 26, 27, 78, 80, 81, 82, 234, 240, 242, 243, 244, 246, 702, 703, 720, 726, 728, 729, 730, 732, 738, 2105, 2106, 2107, 2109, 2160, 2161, 2178, 2184, 2186, 2187, 2188, 2190, 2196, 2213, 2214, 6315, 6317, 6318, 6319, 6321, 6327, 6479, 6480, 6481, 6483
Offset: 0

Views

Author

Peter Kagey, Dec 05 2022

Keywords

Comments

A far-difference representation of an integer is the unique way to write that integer of the sum/difference of Fibonacci numbers such that any two terms in the sum with the same sign differ by at least an index of 4 and any two terms with different signs differ by an index of at least 3.
This sequence is also the list of numbers whose balanced ternary representation has the property that all signed-digits with the same sign differ by at least 4 positions and all signed-digits with different signs differ by at least 3 positions.

Examples

			Let F_i be the i-th term of the 0-indexed Fibonacci sequence beginning 1, 2, 3, 5, 8, ... .
| n  | far-difference               | a(n)                  |
|----+------------+-----------------+-----------------+-----+
| 10 | 13 - 3     | F_5 - F_2       | 3^5 - 3^2       | 234 |
| 11 | 13 - 2     | F_5 - F_1       | 3^5 - 3^1       | 240 |
| 12 | 13 - 1     | F_5 - F_0       | 3^5 - 3^0       | 242 |
| 13 | 13         | F_5             | 3^5             | 243 |
| 14 | 13 + 1     | F_5 + F_0       | 3^5 + 3^0       | 244 |
| 15 | 13 + 2     | F_5 + F_1       | 3^5 + 3^1       | 246 |
| 16 | 21 - 5     | F_6 - F_3       | 3^6 - 3^3       | 702 |
| 17 | 21 - 5 + 1 | F_6 - F_3 + F_0 | 3^6 - 3^3 + 3^0 | 703 |
| 18 | 21 - 3     | F_6 - F_2       | 3^6 - 3^2       | 720 |
| 19 | 21 - 2     | F_6 - F_1       | 3^6 - 3^1       | 726 |
| 20 | 21 - 1     | F_6 - F_0       | 3^6 - 3^0       | 728 |
		

Crossrefs