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 A305876 #21 Jun 14 2018 15:29:19 %S A305876 1,2,5,16,36,84,273,648,2114,4757,16516,37161,87045,282896,673924, %T A305876 2184233,5263877,17107472,38830244,134554132,303080705,707272770, %U A305876 2300725397,5457925252,17805431433,42970665029,139654661284,314223120404,1099646108737,2474203744786 %N A305876 a(n) = Fibbinary(2^n). %H A305876 Alois P. Heinz, <a href="/A305876/b305876.txt">Table of n, a(n) for n = 0..2306</a> %F A305876 a(n) = A003714(2^n). %F A305876 A014417(2^n) = A007088(a(n)). %e A305876 a(6) = A003714(2^6) = A003714(64) = 273 = 100010001_2 because F(0+2) + F(4+2) + F(8+2) = 1 + 8 + 55 = 64, where 0, 4, 8 are the indices of 1 bits in 100010001_2. A014417(64) = 100010001 = A007088(273). %p A305876 F:= proc(n) F(n):= `if`(n<2, n, F(n-1)+F(n-2)) end: %p A305876 b:= proc(n) local j; %p A305876 if n=0 then 0 %p A305876 else for j from 2 while F(j+1)<=n do od; %p A305876 b(n-F(j))+2^(j-2) %p A305876 fi %p A305876 end: %p A305876 a:= n-> b(2^n): %p A305876 seq(a(n), n=0..35); %o A305876 (Python) %o A305876 def A305876(n): %o A305876 m, tlist, s = 2**n, [1,2], 0 %o A305876 while tlist[-1]+tlist[-2] <= m: %o A305876 tlist.append(tlist[-1]+tlist[-2]) %o A305876 for d in tlist[::-1]: %o A305876 s *= 2 %o A305876 if d <= m: %o A305876 s += 1 %o A305876 m -= d %o A305876 return s # _Chai Wah Wu_, Jun 14 2018 %Y A305876 Cf. A000045, A000079, A003714 (Fibbinary), A007088, A014417, A305380. %K A305876 nonn,base %O A305876 0,2 %A A305876 _Alois P. Heinz_, Jun 12 2018