login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A138182
Smallest summand in the Zeckendorf representation of the n-th prime.
4
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,1
FORMULA
a(n) = A139764(A000040(n)). [From R. J. Mathar, Oct 23 2010]
EXAMPLE
a(5) = 3 because the Zeckendorf representation of the 5th prime is 11 = 3 + 8.
PROG
(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
CROSSREFS
Sequence in context: A265668 A273087 A236434 * A167835 A102044 A370590
KEYWORD
easy,nonn
AUTHOR
Colm Mulcahy, Mar 04 2008
EXTENSIONS
a(8) replaced by 1. Sequence extended beyond a(18) - R. J. Mathar, Oct 23 2010
STATUS
approved