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”).
%I #10 Jun 14 2018 17:08:44
%S 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,
%T 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,
%U 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
%N Smallest summand in the Zeckendorf representation of the n-th prime.
%H Chai Wah Wu, <a href="/A138182/b138182.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A139764(A000040(n)). [From _R. J. Mathar_, Oct 23 2010]
%e a(5) = 3 because the Zeckendorf representation of the 5th prime is 11 = 3 + 8.
%o (Python)
%o from sympy import prime
%o def A138182(n):
%o m, tlist = prime(n), [1,2]
%o while tlist[-1]+tlist[-2] <= m:
%o tlist.append(tlist[-1]+tlist[-2])
%o for d in tlist[::-1]:
%o if d == m:
%o return d
%o elif d < m:
%o m -= d # _Chai Wah Wu_, Jun 14 2018
%Y Cf. A138182, A138183.
%K easy,nonn
%O 1,1
%A _Colm Mulcahy_, Mar 04 2008
%E a(8) replaced by 1. Sequence extended beyond a(18) - _R. J. Mathar_, Oct 23 2010