this post was submitted on 09 Nov 2025
504 points (97.0% liked)
Lifehacks
212 readers
5 users here now
Efficiency in all walks of life.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Wjat does closed form mean? Asking as a stupid botanist, sorry.
Closed form means it can be written out as a specific, finite set of instructions that work the same regardless of what the input to your function is.
For Fibonacci, it is most commonly defined in its recursive form:
But using this form, computing a very large Fibonacci number requires computing all the numbers before it, so it’s not the same finite set of instructions for every number, it takes more computation to generate larger numbers.
However, there is a closed form formula for generating Fibonacci numbers. Using this formula, you can directly compute any large Fibonacci number without having to compute all those intermediate steps. It takes the same amount of work to compute any Fibonacci number.
(Note that a and b here are constants; I only wrote them separately to avoid a mess of nested parenthesis)
For an example of something that doesn’t have a closed form, we do not know of a closed form for generating prime numbers. There are several known algorithms for generating the nth prime number, but they all depend on computing all the previous prime numbers, making it very difficult to compute very large prime numbers (in fact, how generating large primes is actually done is by making an educated guess and then checking that it’s actually prime). Discovering a closed form formula for prime numbers would have a huge impact on mathematics and cryptography.
Thank you. So does that mean that the Fibonacci can help us because just like the miles-km algorithm it is closed form, so we can use it to compute a single number, and at the same time it gives us similarish results because of coincidence?