A214973 Number of terms in greedy representation of n using Fibonacci and Lucas numbers.
1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 2, 2, 3, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 3, 2, 2, 3, 3, 2, 3, 1, 2, 2, 2, 2, 2, 3, 2, 1, 2, 2, 2, 2, 2, 3, 2, 2, 3, 3, 2, 3, 2, 3, 3, 3, 3, 2, 3, 3, 1, 2, 2, 2, 2, 2, 3, 2, 2, 3, 3, 2, 3, 1, 2, 2, 2, 2, 2, 3, 2, 2, 3, 3
Offset: 1
Keywords
Examples
Let F, L, U denote the Fibonacci (aka Zeckendorf), Lucas, and greedy F-union-L representations. Then 45 = 34+8+3 (F) = 29+11+4+1 (L) = 34+11 (U), which shows that a(45) = 2 and that the U representation of 45 requires fewer terms than the others; 45 is the least number having this property.
Links
- Clark Kimberling, Table of n, a(n) for n = 1..10000
- Jon Maiga, Computer-generated formulas for A214973, Sequence Machine.
Programs
-
Mathematica
s = Reverse[Union[Flatten[Table[{Fibonacci[n + 1], LucasL[n - 1]}, {n, 1, 22}]]]]; Map[Length[Select[Reap[FoldList[(Sow[Quotient[#1, #2]]; Mod[#1, #2]) &, #, s]] [[2, 1]], # > 0 &]] &, Range[120]] (* Peter J. C. Moses, Oct 18 2012 *)
-
PARI
w(n)=if(n%2, fibonacci(n\2+3), fibonacci(n\2) + fibonacci(n\2+2)); k(n)=if(n<9, return(if(n==6,5,n))); for(i=8,n, if(w(i)>n, return(w(i-1)))); a(n)=my(s); while(n, n-=k(n); s++); s; \\ Charles R Greathouse IV, Oct 14 2021
Formula
Conjecture: a(n) = A329320(A048679(n)) for n > 0 (noticed by Sequence Machine). - Mikhail Kurkov, Oct 13 2021
Comments