login
A263400
Smallest index k such that Fibonacci(k) contains Fibonacci(n) as a proper substring in decimal notation.
1
15, 7, 7, 8, 7, 10, 11, 26, 26, 31, 40, 66, 79, 40, 132, 64, 58, 339, 433, 387, 254, 1158, 691, 74, 623, 1450, 3136, 3867, 1066, 1801, 953, 10392, 6051, 4677, 6092, 7445, 17382, 19526, 27332, 28226, 102495, 84345, 36245, 44281, 102373, 238850, 163880, 308518
OFFSET
0,1
LINKS
EXAMPLE
a(7) = 26 because Fibonacci(26) = 121393 contains Fibonacci(7) = 13.
MAPLE
with(combinat, fibonacci):
printf("%d %d \n", 0, 15):
for n from 1 to 26 do:
ii:=0:fn:=fibonacci(n):l:=length(fn) :
for k from 1 to 10000 while(ii=0) do:
fk:=fibonacci(k):xk:=convert(fk, base, 10):nk:=nops(xk):
n1:=nk-l+1:
for j from 1 to n1 while(ii=0) do:
s:=sum('xk[j+i-1]*10^(i-1)', 'i'=1..l):
if s=fn and fn<>fk
then
ii:=1:printf("%d %d \n", n, k):
else
fi:
od:
od:
od:
MATHEMATICA
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 *)
PROG
(Python)
from gmpy2 import fib2, digits
def A263400(n):
b, a = fib2(n)
s, m = digits(b), n
while True:
a, b, m = b, a+b, m+1
t = digits(b)
if b > a and s in t:
return m # Chai Wah Wu, Oct 27 2015
CROSSREFS
Cf. A263393.
Sequence in context: A362409 A097532 A033335 * A240909 A133817 A173447
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Oct 17 2015
EXTENSIONS
a(31) - a(47) from Michael De Vlieger, Oct 19 2015
STATUS
approved