An open API service indexing awesome lists of open source software.

https://github.com/kynan/codedojo30

Representing integers in the Fibonacci basis
https://github.com/kynan/codedojo30

Last synced: about 2 months ago
JSON representation

Representing integers in the Fibonacci basis

Awesome Lists containing this project

README

          

Representing integers in the Fibonacci basis
============================================

We can use the Fibonacci sequence as a [basis for a numbering system][1]:

10 = 10010Fib = 0 * 1 + 1 * 2 + 0 * 3 + 0 * 5 + 1 * 8

This representation is not necessarily unique (unlike the decimal number
system), e.g. 4 = 11Fib or 100Fib.

Built by [Florian Rathgeber][2] for the [London Code Dojo 30][2].

Usage
-----

python fib.py N

Shows the Fibonacci base representations of the integers up to `N`.

License
-------

MIT

[1]: http://www.maths.surrey.ac.uk/hosted-sites/R.Knott/Fibonacci/fibrep.html#fibbase
[2]: https://twitter.com/frathgeber
[3]: http://www.meetup.com/London-Code-Dojo/events/151874652/