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.

A025502 Number of terms in Zeckendorf representation of 10^n.

Original entry on oeis.org

1, 2, 3, 2, 6, 9, 5, 9, 13, 14, 16, 11, 15, 21, 20, 18, 21, 26, 27, 23, 24, 25, 28, 35, 33, 35, 34, 31, 40, 35, 42, 40, 43, 44, 45, 50, 51, 44, 53, 51, 57, 58, 63, 53, 54, 65, 61, 65, 64, 67, 64, 69, 63, 77, 66, 75, 81, 80, 79, 79, 78, 77, 77, 79, 82, 97, 91, 90, 100, 91, 91, 91, 102
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A007895.

Programs

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