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.
%I A229047 #31 Oct 16 2024 14:53:00 %S A229047 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, %T A229047 33,32,33,54,88,13,14,15,25,16,17,28,46,18,19,20,33,32,33,54,88,29,30, %U A229047 31,51,32,33,54,88,52,53,54,88,87,88,143,232,21,22,23,38,24,25,41 %N 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). %C A229047 Index of r in A014417, where r = ReplaceAll('11' -> '101' in bin(n)). %e A229047 Base 2 representation of 14 is 1110, that is 101010 after the replacement, that is A014417(20), so a(14)=20. %o A229047 (Python) %o A229047 fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597] %o A229047 for n in range(333): %o A229047 res = 0 %o A229047 bit = resbit = 1 %o A229047 while bit<=n: %o A229047 if n&bit: res += resbit %o A229047 resbit*=2 %o A229047 if (n&bit) and (n&(bit*2)): resbit*=2 %o A229047 bit*=2 %o A229047 #print(bin(n), bin(res), end=', ') %o A229047 an = i = 0 %o A229047 while res: %o A229047 if res&1: an += fib[2+i] %o A229047 i += 1 %o A229047 res >>= 1 %o A229047 print(an, end=', ') %Y A229047 Cf. A014417, A000045. %K A229047 nonn,base %O A229047 0,3 %A A229047 _Alex Ratushnyak_, Sep 25 2013