OFFSET
1,1
LINKS
Eric W. Weisstein, MathWorld: Fibonacci Number
FORMULA
f(x) = (phi^x - cos(Pi*x) * phi^(-x))/sqrt(5), where phi = (1+sqrt(5))/2 (the golden ratio). The function f, a generalization over the reals of the Binet formula, gives Fibonacci numbers for integer values of x; e.g., f(3) = 2, f(4) = 3, f(5) = 5. [Corrected by Daniel Forgues, Oct 05 2016]
EXAMPLE
4.549112556507743239203225039690296777977751571212553...
MATHEMATICA
r = GoldenRatio; s = 1/Sqrt[5];
f[x_] := s*(r^x - Cos[Pi*x] * r^(-x));
x /. FindRoot[Fibonacci[x] == 4, {x, 5}, WorkingPrecision -> 100]
RealDigits[%, 10]
(Show[Plot[#1, #2], ListPlot[Table[{x, #1}, #2]]] &)[
Fibonacci[x], {x, -7, 7}] (* Peter J. C. Moses, Jun 21 2011 *)
PROG
(PARI) phi = (1+sqrt(5))/2; solve(x=4, 5, (phi^x - cos(Pi*x) * phi^(-x))/sqrt(5) - 4) \\ Michel Marcus, Oct 05 2016
CROSSREFS
KEYWORD
nonn,cons
AUTHOR
Clark Kimberling, Jun 21 2011
STATUS
approved