Continued fraction for positive integer

 

It is known that

 

  for any nonnegative integer k.

 

When k=0 in particular,

 

 

With some complicated induction(proof is omitted), we finally have

 

 that is the same as above

 

and in general

 

 in special form for any positive integer k.

 

This holds for small positive integers. For large integer, it may deviate a lot.

 

If we use the nearest integer kf to k, we can calculate decimal as well. That is,

 

  in special form

 

where kf is the nearest integer to k.

 

We here expand kf and adjust it by multiplying k/kf to the first numerator.