Hacker News new | past | comments | ask | show | jobs | submit login

This was the content of the final lecture of a linear algebra class I took. It was magical to learn about the explicit formula for Fibonacci numbers found via eigendecomposition.

One funny trick that brought some realism to the lecture: If a and b are the golden ratio and its conjugate, then f_n = a^n + b^n. But since |b| < 1, you can just do f_n = nearest_integer(a^n).




> If a and b are the golden ratio and its conjugate, then f_n = a^n + b^n. But since |b| < 1, you can just do f_n = nearest_integer(a^n).

Well, almost. You need to multiply by a factor of 1/sqrt(5) before rounding.


I sketched an alternative accurate way to the calculations here https://news.ycombinator.com/item?id=36952832 It is not faster though.


note that f_n = (a^n + b^n) / sqrt(5) ~ a^n / sqrt(5)

the denominator is important.

also another interesting relation is a^n ~ f_(n+1) + f_(n-1) = f_(n+2) - f_(n-2)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: