Song Player

Below is a song player interface that shows up on the bottom of the page when this site is displayed on a screen.

Loading...
Now playing: Song Artwork
/

zeckendorf

Tools for working with Zeckendorf representations.

standard-readme compliant

The Zeckendorf representation of a positive integer is the unique set of non-consecutive Fibonacci numbers that sum to it. For example:

  • 12 = 8 + 3 + 1
  • 75 = 55 + 13 + 5 + 2

This package provides functionality for generating, interpreting, and processing these representations in various ways.

Table of Contents

Background

I made this package as a testing ground for learning how to properly set up and distribute Python packages. Calculating Zeckendorf representations has become my go-to exercise when learning a new programming language, and I thought it would be more fun here than just making the empty "example-pkg" laid out in the PyPUG tutorial.

Usage

>>> import zeckendorf
>>> list(zeckendorf.zeck(12))
[8, 3, 1]
>>> zeckendorf.binary.str_from_int(28)
'1001010'

Contributing

N/A

License

MIT © Owen Maitzen