A131340 Number of 0's in minimal Lucas representation (A130310) of n.
1, 0, 2, 3, 2, 2, 4, 3, 3, 3, 5, 4, 4, 4, 4, 3, 3, 6, 5, 5, 5, 5, 4, 4, 5, 4, 4, 4, 7, 6, 6, 6, 6, 5, 5, 6, 5, 5, 5, 6, 5, 5, 5, 5, 4, 4, 8, 7, 7, 7, 7, 6, 6, 7, 6, 6, 6, 7, 6, 6, 6, 6, 5, 5, 7, 6, 6, 6, 6, 5, 5, 6, 5, 5, 5, 9, 8, 8, 8, 8, 7, 7, 8, 7, 7, 7, 8
Offset: 1
Keywords
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
- Ron Knott, Using the Fibonacci numbers to represent whole numbers.
Programs
-
Mathematica
a[n_] := Module[{s = {}, m = n, k = 1}, While[m > 0, If[m == 1, k = 1; AppendTo[s, k]; m = 0, If[m == 2, k = 0; AppendTo[s, k]; m = 0, While[LucasL[k] <= m, k++]; k--; AppendTo[s, k]; m -= LucasL[k]; k = 1]]]; Total[1 - IntegerDigits[Total[2^s], 2]]]; Array[a, 100] (* Amiram Eldar, Jul 05 2025 *)
Extensions
More terms from Amiram Eldar, Jul 05 2025