Description Usage Arguments Details Value Examples

Generates the Zeckendorf representation of an integer as a sum of Fibonacci numbers.

1 | ```
zeck(n)
``` |

`n` |
integer. |

According to Zeckendorfs theorem from 1972, each integer can be uniquely represented as a sum of Fibonacci numbers such that no two of these are consecutive in the Fibonacci sequence.

The computation is simply the greedy algorithm of finding the highest
Fibonacci number below `n`

, subtracting it and iterating.

List with components `fibs`

the Fibonacci numbers that add sum up to
`n`

, and `inds`

their indices in the Fibonacci sequence.

1 2 3 |

numbers documentation built on May 17, 2018, 9:05 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.