Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For people who are generally interested in these kind of identities relating a fraction to a recursion, please check out the generatingfunctionology book [1]. The basic idea is to define f(x) = sum_n f_n x^n where f_n satisfies some recursion equation. Very often you can find f(x) as p(x) / q(x) where p and q are polynomials in x. Now you can simply evaluate f(0.1) or more generally f(b^-l) where b is a base and l a positive integer, which gives you on the left-hand side your rational number as a fraction, and on the right-hand side the decimal expansion.

[1] https://www.math.upenn.edu/~wilf/gfologyLinked2.pdf



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

Search: