|
|
A072352
|
|
a(n) is the largest n-digit Fibonacci number.
|
|
3
|
|
|
8, 89, 987, 6765, 75025, 832040, 9227465, 63245986, 701408733, 7778742049, 86267571272, 956722026041, 6557470319842, 72723460248141, 806515533049393, 8944394323791464, 99194853094755497, 679891637638612258, 7540113804746346429, 83621143489848422977
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(3)=987, as 987 is largest 3-digit Fibonacci number.
|
|
MAPLE
|
fib:= combinat:-fibonacci:
g:= proc(x) local n;
n:= floor(ln((2*x+1)*sqrt(5)/2)/ln((1+sqrt(5))/2));
if fib(n) > x then while fib(n) > x do n:= n-1 od
elif fib(n+1) <= x then while fib(n+1) <= x do n:= n+1 od
fi;
fib(n)
end:
# second Maple program:
F:= proc(n) option remember; local f;
f:= `if`(n=1, [1$2], F(n-1));
do f:= [f[2], f[1]+f[2]];
if length(f[1])<length(f[2]) then break fi
od; f
end:
a:= n-> F(n)[1]:
|
|
MATHEMATICA
|
|
|
PROG
|
(Python)
list = []
x, y = 1, 1
while len(list) < n:
if len(str(x)) < len(str(y)):
list.append(x)
x, y = y, x + y
return list
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|