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 A118241 #20 Jan 25 2025 04:17:43 %S A118241 0,0,1,2,3,5,7,10,11,13,14,15,21,23,26,27,29,31,42,43,45,46,47,53,55, %T A118241 58,59,61,62,63,85,87,90,91,93,95,106,107,109,110,111,117,119,122,123, %U A118241 125,127,170,171,173,174,175,181,183,186,187,189,190,191,213,215,218,219 %N A118241 Interpret A118240 as a binary sequence and convert to decimal. %e A118241 6 = 111.01101010... in base phi using the least-greedy algorithm, so A118240(6)=111, so a(6)=7. %o A118241 (Pseudocode) %o A118241 constant (float): phi=(sqrt(5)+1)/2; %o A118241 variable (float): lphi=phi^floor[log(n)/log(phi)]; %o A118241 variable (float): rem=n; %o A118241 variable (integer): count=0; %o A118241 loop: while lphi>1 {count=count*2; lphi=lphi/phi; if(rem > lphi*phi) { rem=rem-lphi; count++;}} %Y A118241 Cf. A118240, A105425. %K A118241 nonn,base %O A118241 0,4 %A A118241 _Graeme McRae_, Apr 17 2006