A118240 The part of n in base phi left of the decimal using a least-greedy algorithm representation.
0, 1, 1, 10, 11, 101, 111, 1010, 1011, 1101, 1110, 1111, 10101, 10111, 11010, 11011, 11101, 11111, 101010, 101011, 101101, 101110, 101111, 110101, 110111, 111010, 111011, 111101, 111110, 111111, 1010101, 1010111, 1011010, 1011011, 1011101
Offset: 0
Examples
6 = 111.01101010... in base phi using the least-greedy algorithm. The part to the left of the decimal is a(6) = 111.
Links
- Ron Knott, Phigits and the Base Phi representation.
- Jeffrey Shallit, Proving Properties of phi-Representations with the Walnut Theorem-Prover, arXiv:2305.02672 [math.NT], 2023. [Note that this document has been revised multiple times.]
Programs
-
Pseudocode
constant (float): phi=(sqrt(5)+1)/2; variable (float): lphi=phi^floor[log(n)/log(phi)]; variable (float): rem=n; variable (integer): count=0; loop: while lphi>1 {count=count*10; lphi=lphi/phi; if(rem > lphi*phi) { rem=rem-lphi; count++;}}
Extensions
a(1) corrected by N. J. A. Sloane, May 27 2023
Comments