Skip to content

ZeckendorfNumerals ​

Zeckendorf: binary digits over the Fibonacci place values 1,2,3,5,8,…1,2,3,5,8,\dots — every positive integer has exactly one representation with no two adjacent ones, and greedy digit choice finds it.

ZeckendorfNumerals()the system, digits 0,10,1, no two adjacent ones
Typed signatures
TypePackageApplies
() -> valuenumeralsalways

Domain: Numeral systems

Examples

Basic #

100=89+8+3100 = 89 + 8 + 3: no two adjacent ones

live ↗
InIntegerDigits(100,ZeckendorfNumerals)\mathrm{IntegerDigits}(100, \mathrm{ZeckendorfNumerals})Out[1,0,0,0,0,1,0,1,0,0]\bigl\lbrack1, 0, 0, 0, 0, 1, 0, 1, 0, 0\bigr\rbrack
About
Examples1

See also: IntegerDigits, OstrowskiNumerals