A055778 Number of 1's in the base-phi representation of n.
0, 1, 2, 2, 3, 3, 3, 2, 3, 4, 4, 5, 4, 4, 4, 5, 4, 4, 2, 3, 4, 4, 5, 5, 5, 4, 5, 6, 6, 7, 5, 5, 5, 6, 5, 5, 4, 5, 6, 6, 7, 5, 5, 5, 6, 5, 5, 2, 3, 4, 4, 5, 5, 5, 4, 5, 6, 6, 7, 6, 6, 6, 7, 6, 6, 4, 5, 6, 6, 7, 7, 7, 6, 7, 8, 8, 9, 6, 6, 6, 7, 6, 6, 5, 6, 7, 7, 8, 6, 6, 6, 7, 6, 6, 4, 5, 6, 6, 7, 7, 7, 6, 7, 8, 8
Offset: 0
Examples
The phi-expansions for n<=15 are: n phi-rep(n) a(n) 0 0. 0 1 1. 1 2 10.01 2 3 100.01 2 4 101.01 3 5 1000.1001 3 6 1010.0001 3 7 10000.0001 2 8 10001.0001 3 9 10010.0101 4 10 10100.0101 4 11 10101.0101 5 12 100000.101001 4 13 100010.001001 4 14 100100.001001 4 15 100101.001001 5 - _Joerg Arndt_, Jan 30 2012
Links
- Carmine Suriano, Table of n, a(n) for n = 0..5000
- Michel Dekking, Points of increase of the sum of digits function of the base phi expansion, arXiv:2003.14125 [math.CO], 2020.
- F. Michel Dekking, The sum of digits functions of the Zeckendorf and the base phi expansions, Theoretical Computer Science, 2021.
- Ron Knott, Using Powers of Phi to represent Integers (Base Phi) (inspiration for this sequence).
- Jeffrey Shallit, Proving Properties of phi-Representations with the Walnut Theorem-Prover, arXiv:2305.02672 [math.NT], 2023.
- Eric Weisstein's World of Mathematics, Phi Number System
Programs
-
Mathematica
nn = 100; len = 2*Ceiling[Log[GoldenRatio, nn]]; Table[d = RealDigits[n, GoldenRatio, len]; Total[d[[1]]], {n, 0, nn}] (* T. D. Noe, May 20 2011 *)
-
Pseudocode
constant (float): phi=(sqrt(5)+1)/2; function: lphi(x)=log(x)/log(phi); variable (float): rem=n; variable (integer): count=0; loop: while rem>0 {rem=rem-phi^floor[lphi(rem)]; count++;} result: return count; // Henry Bottomley, Aug 04 2000
Formula
a(n) = delta(x), where x is the fixed point starting with (0,0) of the morphism (j,0)->(j,0)(j,1), (j,1)->(j,2)(j,3), (j,2)->(j+2,0)(j+2,1)(j+2,2), (j,3)->(j+1,3)(j+2,2)(j+1,3) for all natural numbers j, and delta is the decoration morphism (j,0)-> j,j+1, (j,1)-> j+2, (j,2)-> j+2,j+3, (j,3)-> j+3,j+3 for all natural numbers j. - Michel Dekking, Feb 06 2021
a(n) <= (A190796(n) + 1)/2. - Charles R Greathouse IV, Apr 21 2023
Extensions
More terms from Henry Bottomley, Aug 04 2000
Comments