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”).

Smallest index k such that Fibonacci(k) contains Fibonacci(n) as a proper substring in decimal notation.
1

%I #21 Oct 31 2015 00:36:25

%S 15,7,7,8,7,10,11,26,26,31,40,66,79,40,132,64,58,339,433,387,254,1158,

%T 691,74,623,1450,3136,3867,1066,1801,953,10392,6051,4677,6092,7445,

%U 17382,19526,27332,28226,102495,84345,36245,44281,102373,238850,163880,308518

%N Smallest index k such that Fibonacci(k) contains Fibonacci(n) as a proper substring in decimal notation.

%H Chai Wah Wu, <a href="/A263400/b263400.txt">Table of n, a(n) for n = 0..54</a>

%e a(7) = 26 because Fibonacci(26) = 121393 contains Fibonacci(7) = 13.

%p with(combinat,fibonacci):

%p printf("%d %d \n",0,15):

%p for n from 1 to 26 do:

%p ii:=0:fn:=fibonacci(n):l:=length(fn) :

%p for k from 1 to 10000 while(ii=0) do:

%p fk:=fibonacci(k):xk:=convert(fk,base,10):nk:=nops(xk):

%p n1:=nk-l+1:

%p for j from 1 to n1 while(ii=0) do:

%p s:=sum('xk[j+i-1]*10^(i-1)', 'i'=1..l):

%p if s=fn and fn<>fk

%p then

%p ii:=1:printf("%d %d \n",n,k):

%p else

%p fi:

%p od:

%p od:

%p od:

%t Table[k = 1; While[Nand[StringContainsQ[ToString@ Fibonacci@ k, ToString@ Fibonacci@ n], Fibonacci@ k != Fibonacci@ n], k++]; k, {n, 0, 38}] (* _Michael De Vlieger_, Oct 19 2015 *)

%o (Python)

%o from gmpy2 import fib2, digits

%o def A263400(n):

%o b, a = fib2(n)

%o s, m = digits(b), n

%o while True:

%o a, b, m = b, a+b, m+1

%o t = digits(b)

%o if b > a and s in t:

%o return m # _Chai Wah Wu_, Oct 27 2015

%Y Cf. A263393.

%K nonn,base

%O 0,1

%A _Michel Lagneau_, Oct 17 2015

%E a(31) - a(47) from _Michael De Vlieger_, Oct 19 2015