Continued Fractions
pk+1 = ak+1pk + pk-1, and
qk+1 = ak+1qk + qk-1
p-2 = q-1 = 0 and
p-1 = q-2 = 1
Leveque, James. Fundamentals of Number Theory. See http://www.amazon.com/exec/obidos/tg/detail/-/0486689069/
qid=1074367205//ref=sr_8_xs_ap_i0_xgl14/002-8476672-9958465?v=glance&s=books&n=507846.
Davenport, H. The Higher Arithmetic. See http://www.amazon.com/exec/obidos/tg/detail/-/0486689069/
qid=1074367205//ref=sr_8_xs_ap_i0_xgl14/002-8476672-9958465?v=glance&s=books&n=507846.
Most information in the writeup comes from personal knowledge gleaned from various sources over the years. However, the above references are either very helpful, well-written, highly-recommended, or several of these things.