login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A055778 Number of 1's in base phi representation of n. 15
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Uses greedy algorithm (start with largest possible power of phi, then work downward) - see pseudo-code below.

Conjecture: For all n, A007895(n) <= A055778(n). There is equality at 1, 7, 18, 19, 47, 48, 54, 123, 124, 130, 141, 142, 322, 323, 329, 340, 341, 369, 370, 376, 843, 844, 850, 861, 862, 890, 891, 897, 966, 967, 973, 984, 985, 2207, 2208, 2214, 2225, 2226, 2254, 2255, 2261, 2330, 2331, 2337, 2348, 2349, 2529, 2530, 2536, 2547, 2548, 2576, 2577, 2583, ... - Dale Gerdemann at Sun Apr 01 17:09:19 EDT 2012

LINKS

Carmine Suriano, Table of n, a(n) for n = 0..5000

Ron Knott, Using Powers of Phi to represent Integers (Base Phi) (inspiration for this sequence).

Eric Weisstein's World of Mathematics, Phi Number System

EXAMPLE

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]

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 *)

PROG

(Pseudo-code from Henry Bottomley):

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(x)]; count++; } result: return count;

CROSSREFS

Sequence in context: A194883 A175453 A014499 * A106482 A260236 A122462

Adjacent sequences:  A055775 A055776 A055777 * A055779 A055780 A055781

KEYWORD

base,easy,nonn

AUTHOR

Robert Lozyniak (11(AT)onna.com), Jul 12 2000

EXTENSIONS

More terms and algorithm from Henry Bottomley, Aug 04 2000

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified November 18 02:54 EST 2017. Contains 294840 sequences.