OFFSET
0,3
COMMENTS
All terms are fibbinary numbers (A003714).
To compute a(n): consider the run lengths in the binary expansion of n (i.e. the n-th row of A101211) and replace from left to right each value v > 1 at odd index with (1, v-1); at the end, there remain the run lengths in the binary expansion of a(n).
See A361676 for the greatest k's.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..8191
Rémy Sigrist, PARI program
FORMULA
EXAMPLE
The first terms, in decimal and in binary, are:
n a(n) bin(n) bin(a(n))
-- ---- ------ ---------
0 0 0 0
1 1 1 1
2 2 10 10
3 2 11 10
4 4 100 100
5 5 101 101
6 5 110 101
7 4 111 100
8 8 1000 1000
9 9 1001 1001
10 10 1010 1010
11 10 1011 1010
12 10 1100 1010
13 10 1101 1010
14 9 1110 1001
15 8 1111 1000
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Mar 19 2023
STATUS
approved