I was reading up on the Fibonacci Sequence, $1,1,2,3,5,8,13,\ldots $ when I noticed some were able to calculate specific numbers. So far I've only figured out creating an array and counting to the value, which is incredibly simple, but I reckon I can't find any formula for calculating a Fibonacci number based on it's position.
Is there a way to do this? If so, how are we able to apply these formulas to arrays?
Wikipedia has a closed-form function called "Binet's formula".
$$F\left(n\right) = {{\varphi^n-(1-\varphi)^n} \over {\sqrt 5}}$$
This is based on the Golden Ratio.