

A229047


Replace all '11' => '101' in the binary representation of n, treat the result as representation of a(n) in base of Fibonacci numbers (A014417).


0



0, 1, 2, 4, 3, 4, 7, 12, 5, 6, 7, 12, 11, 12, 20, 33, 8, 9, 10, 17, 11, 12, 20, 33, 18, 19, 20, 33, 32, 33, 54, 88, 13, 14, 15, 25, 16, 17, 28, 46, 18, 19, 20, 33, 32, 33, 54, 88, 29, 30, 31, 51, 32, 33, 54, 88, 52, 53, 54, 88, 87, 88, 143, 232, 21, 22, 23, 38, 24, 25, 41
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


COMMENTS

Index of r in A014417, where r = ReplaceAll('11' > '101' in bin(n)).


LINKS

Table of n, a(n) for n=0..70.


EXAMPLE

Base 2 representation of 14 is 1110, that is 101010 after the replacement, that is A014417(20), so a(14)=20.


PROG

(Python)
fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597]
for n in range(333):
res = 0
bit = resbit = 1
while bit<=n:
if n&bit: res += resbit
resbit*=2
if (n&bit) and (n&(bit*2)): resbit*=2
bit*=2
#print bin(n), bin(res),
an = i = 0
while res:
if res&1: an += fib[2+i]
i += 1
res >>= 1
print an,


CROSSREFS

Cf. A014417, A000045.
Sequence in context: A178151 A087794 A050514 * A133702 A080001 A178938
Adjacent sequences: A229044 A229045 A229046 * A229048 A229049 A229050


KEYWORD

nonn,base


AUTHOR

Alex Ratushnyak, Sep 25 2013


STATUS

approved



