A131343 Number of 1's in maximal Lucas representation (A130311) of n.
0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 3, 3, 4, 4, 4, 4, 5, 4, 4, 4, 5, 4, 4, 5, 5, 5, 5, 6, 4, 4, 5, 5, 5, 5, 6, 5, 5, 5, 6, 5, 5, 6, 6, 6, 6, 7, 5, 5, 5, 6, 5, 5, 6, 6, 6, 6, 7, 5, 5, 6, 6, 6, 6, 7, 6, 6, 6, 7, 6, 6, 7, 7, 7, 7, 8, 5, 5, 6, 6, 6, 6, 7, 6, 6, 6, 7
Offset: 0
Links
- Amiram Eldar, Table of n, a(n) for n = 0..10000
- Ron Knott, Using the Fibonacci numbers to represent whole numbers.
Programs
-
Mathematica
lazy = Select[IntegerDigits[Range[400], 2], SequenceCount[#, {0, 0}] == 0 &]; t = Total[# * Reverse@LucasL[Range[0, Length[#] - 1]]] & /@ lazy; Join[{0}, Plus@@@ lazy[[TakeWhile[Flatten[FirstPosition[t, #] & /@ Range[Max[t]]], NumberQ]]]] (* Amiram Eldar, Feb 17 2022 *)
Formula
Extensions
a(0) and more terms from Amiram Eldar, Feb 17 2022