3
$\begingroup$

How can I solve an inequality that involves the Fibonacci function? For instance, say I want to determine for which values of $n$ we get that $$F_n\leqslant 1000.$$ I tried to use Solve and Reduce, like this,

Reduce[(Fibonacci[n] < 40) && n \[Element] Integers, {n}]

But I get, in both cases, this error code: “This system cannot be solved with the methods available to Reduce (or Solve)”.

One alternative solution is to use plots, but this wont work if we're dealing with large values, example, $$F_n\leqslant 4.183713\cdot10^{11}.$$

So how to solve these type of inequalities manually?

$\endgroup$
  • 1
    $\begingroup$ In the help NestWhile[(# + 1) &, 1, Fibonacci[#] < 1000 &] $\endgroup$ – bobbym Apr 14 '16 at 18:35
  • $\begingroup$ Could use the method here to invert the equality, then adjust for inequality. $\endgroup$ – Daniel Lichtblau Apr 14 '16 at 21:00
3
$\begingroup$

As commented:

    f[x] := NestWhile[(# + 1) &, 1, Fibonacci[#] <= x &,   1, \[Infinity], -1]

For 1000:

f[1000]

16

For your large number:

f[4.183713*10^11]

57

To make sure:

Fibonacci[57] < 4.183713*10^11 < Fibonacci[58]

gives True.

$\endgroup$
  • $\begingroup$ Fibonacci[58] is 591286729879 which greater than 4.183713*10^11 $\endgroup$ – BlacKow Apr 14 '16 at 18:31
  • $\begingroup$ @BlacKow You were right, it was always off by one index. Just fixed it. $\endgroup$ – MathX Apr 14 '16 at 18:39
2
$\begingroup$
fibbo[n_Integer] := Fibonacci[Range[Floor[Log[GoldenRatio, Sqrt[5]*n + 1/2]]]]

fibbo[10000]
{1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765}

And see here Fibonacci Sequence Generator

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.