|
|
A265747
|
|
Numbers written in Jacobsthal greedy base.
|
|
14
|
|
|
0, 1, 2, 10, 11, 100, 101, 102, 110, 111, 200, 1000, 1001, 1002, 1010, 1011, 1100, 1101, 1102, 1110, 1111, 10000, 10001, 10002, 10010, 10011, 10100, 10101, 10102, 10110, 10111, 10200, 11000, 11001, 11002, 11010, 11011, 11100, 11101, 11102, 11110, 11111, 20000, 100000, 100001, 100002, 100010, 100011, 100100
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
These are called "Jacobsthal Representation Numbers" in Horadam's 1996 paper.
Sum_{i=0..} digit(i)*A001045(2+digit(i)) recovers n from such representation a(n), where digit(0) stands for the least significant digit (at the right), and A001045(k) gives the k-th Jacobsthal number.
No larger digits than 2 will occur, which allows representing the same sequence in a more compact form by base-3 coding in A265746.
Sequence A197911 gives the terms with no digit "2" in their representation, while its complement A003158 gives the terms where "2" occurs at least once.
Numbers beginning with digit "2" in this representation are given by A020988(n) [= 2*A002450(n) = 2*A001045(2n)].
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
For n=7, when selecting the terms of A001045 with the greedy algorithm, we need terms A001045(4) + A001045(2) + A001045(2) = 5 + 1 + 1, thus a(7) = "102".
|
|
MATHEMATICA
|
|
|
PROG
|
(Scheme, with memoization-macro definec)
(Python)
def greedyJ(n): m = (3*n+1).bit_length() - 1; return (m, (2**m-(-1)**m)//3)
def a(n):
if n == 0: return 0
place, value = greedyJ(n)
return 10**(place-2) + a(n - value)
(PARI)
A130249(n) = floor(log(3*n + 1) / log(2));
|
|
CROSSREFS
|
Cf. A265746 (same numbers interpreted in base-3, then shown in decimal).
Cf. A084639 (positions of repunits).
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|