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 A118240 #22 Jan 23 2025 23:30:52 %S A118240 0,1,1,10,11,101,111,1010,1011,1101,1110,1111,10101,10111,11010,11011, %T A118240 11101,11111,101010,101011,101101,101110,101111,110101,110111,111010, %U A118240 111011,111101,111110,111111,1010101,1010111,1011010,1011011,1011101 %N A118240 The part of n in base phi left of the decimal using a least-greedy algorithm representation. %C A118240 Uses least-greedy algorithm (start with largest possible power of phi, writing a 1 only when required, then work downward). %C A118240 a(n) is also the left portion of the base-phi representation of n in Knott's representation which uses the least number of 0's, the most 1's, and in which the right-hand portion (see A362919) is finite. - _N. J. A. Sloane_, May 27 2023 %H A118240 Ron Knott, <a href="http://www.maths.surrey.ac.uk/hosted-sites/R.Knott/Fibonacci/phigits.html">Phigits and the Base Phi representation</a>. %H A118240 Jeffrey Shallit, <a href="https://arxiv.org/abs/2305.02672">Proving Properties of phi-Representations with the Walnut Theorem-Prover</a>, arXiv:2305.02672 [math.NT], 2023. [Note that this document has been revised multiple times.] %e A118240 6 = 111.01101010... in base phi using the least-greedy algorithm. The part to the left of the decimal is a(6) = 111. %o A118240 (Pseudocode) %o A118240 constant (float): phi=(sqrt(5)+1)/2; %o A118240 variable (float): lphi=phi^floor[log(n)/log(phi)]; %o A118240 variable (float): rem=n; %o A118240 variable (integer): count=0; %o A118240 loop: while lphi>1 {count=count*10; lphi=lphi/phi; if(rem > lphi*phi) { rem=rem-lphi; count++;}} %Y A118240 Cf. A055778, A104605, A118241, A105424, A362919, A362920. %K A118240 nonn,base %O A118240 0,4 %A A118240 _Graeme McRae_, Apr 17 2006 %E A118240 a(1) corrected by _N. J. A. Sloane_, May 27 2023