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.

A182578 Number of ones in Zeckendorf representation of n^n.

Original entry on oeis.org

1, 1, 2, 3, 3, 6, 3, 10, 13, 12, 16, 15, 20, 24, 20, 30, 25, 31, 26, 33, 33, 31, 34, 42, 49, 49, 53, 55, 56, 55, 58, 64, 64, 67, 73, 78, 70, 76, 77, 75, 89, 83, 92, 90, 106, 99, 100, 99, 107, 116, 107, 115, 125, 125, 122, 119, 127, 137, 127, 138, 155, 156, 153, 160
Offset: 0

Views

Author

Alex Ratushnyak, May 05 2012

Keywords

Examples

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

Crossrefs

Programs

  • Python
    def A182578(n):
        m, tlist, s = n**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 14 2018