cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A182577 Number of ones in Zeckendorf representation of n!

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 3, 5, 6, 9, 8, 11, 11, 11, 16, 17, 17, 18, 23, 23, 28, 31, 33, 27, 33, 29, 40, 37, 42, 42, 41, 44, 47, 44, 53, 56, 57, 50, 64, 55, 59, 68, 63, 72, 70, 61, 69, 85, 80, 83, 87, 97, 98, 101, 87, 91, 100, 102, 114, 108, 116, 109, 117, 117, 113, 124
Offset: 0

Views

Author

Alex Ratushnyak, May 05 2012

Keywords

Examples

			5! = {1, 0, 0, 1, 0, 1, 0, 0, 1, 0} in the Zeckendorf base.
		

Crossrefs

Programs

  • Python
    from math import factorial
    def A182577(n):
        m, tlist, s = factorial(n), [1,2], 0
        while tlist[-1]+tlist[-2] <= m:
            tlist.append(tlist[-1]+tlist[-2])
        for d in tlist[::-1]:
            if d <= m:
                s += 1
                m -= d
        return s # Chai Wah Wu, Jun 15 2018