Skip to content

Calculate the Zeckendorf representation of an integer

License

Notifications You must be signed in to change notification settings

kenany/zeckendorf

Repository files navigation

zeckendorf

Calculate the Zeckendorf representation of an integer.

Example

var zeckendorf = require('zeckendorf');

zeckendorf(33);
// => 1010101

Installation

$ npm install zeckendorf

API

var zeckendorf = require('zeckendorf');

zeckendorf(n)

Calculates and returns the Zeckendorf form of Number n. The returned Number represents a table of Fibonacci numbers, so zeckendorf(11) returns 10100, which represents: 1*8 + 0*5 + 1*3 + 0*2 + 0*1.

About

Calculate the Zeckendorf representation of an integer

Resources

License

Stars

Watchers

Forks

Packages

No packages published