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.

A138182 Smallest summand in the Zeckendorf representation of the n-th prime.

Original entry on oeis.org

2, 3, 5, 2, 3, 13, 1, 1, 2, 8, 2, 3, 2, 1, 13, 1, 1, 1, 1, 3, 5, 3, 2, 89, 8, 1, 1, 5, 2, 3, 1, 8, 1, 3, 5, 2, 13, 1, 2, 8, 1, 3, 13, 2, 1, 55, 1, 3, 2, 1, 233, 1, 8, 5, 3, 1, 2, 1, 2, 1, 3, 5, 1, 2, 1, 8, 1, 2, 1, 1, 2, 3, 3, 1, 2, 1, 1, 2, 3, 3, 8, 2, 2, 1, 2, 3, 1, 1, 8, 2, 1, 13, 21, 1, 1, 3, 1, 144, 2, 2
Offset: 1

Views

Author

Colm Mulcahy, Mar 04 2008

Keywords

Examples

			a(5) = 3 because the Zeckendorf representation of the 5th prime is 11 = 3 + 8.
		

Crossrefs

Programs

  • Python
    from sympy import prime
    def A138182(n):
        m, tlist = prime(n), [1,2]
        while tlist[-1]+tlist[-2] <= m:
            tlist.append(tlist[-1]+tlist[-2])
        for d in tlist[::-1]:
            if d == m:
                return d
            elif d < m:
                m -= d # Chai Wah Wu, Jun 14 2018

Formula

a(n) = A139764(A000040(n)). [From R. J. Mathar, Oct 23 2010]

Extensions

a(8) replaced by 1. Sequence extended beyond a(18) - R. J. Mathar, Oct 23 2010