<s>[INST] Continued fraction expansion of Pi (oeis A001203). I would like to understand how you get the numbers
$$3+\frac{1}{7+\frac{1}{15+\frac{1}{1+\frac{1}{292+...}}}}$$
i.e. $\{3,7,15,1,292,...\}$ (A001203).
In the comments of A046965 is explained a method for obtaining these numbers, or so it seems:

To illustrate: [3] = 3/1 -> 3; [3,7] = 22/7 -> 22; [3,7,15] = 333/106;
  106 is even -> [3,7,16] = 355/113 -> 355; [3,7,15,1] = 355/113 -> 355
  (ignore); [3,7,15,1,292] = 103993/33102 -> [3,7,15,1,293] =
  104348/33215 -> 104348

$7$ should be $= 2*3+1$, $15$ should be $= 2*7+1$ ... but 292?
 [/INST] In general, for any positive real number $x$ you get the continued fraction as follows.  Let $\lfloor x \rfloor = a_0$.  Then $x =  a_0 + \dfrac{1}{r_1}$ where $r_1 = \dfrac{1}{x - a_0}$.  Continue with $\lfloor r_1 \rfloor = a_1$, and $r_2 = \dfrac{1}{r - a_1}$, etc.  Then $$x = a_0 + \dfrac{1}{a_1 + \dfrac{1}{a_2 + \ldots}}$$ 
In this case $$\eqalign{x &= \pi\cr r_1 &= \dfrac{1}{\pi - 3}\cr
r_2 &= \dfrac{1}{r_1 - 7} = \dfrac{\pi - 3}{22 - 7 \pi}\cr
r_3 &= \dfrac{1}{r_2 - 15} = \dfrac{22 - 7 \pi}{106 \pi - 33}\cr
r_4 &= \dfrac{1}{r_3 - 1} = \dfrac{106 \pi - 33}{355 - 113 \pi}\cr}$$
and $292 = \lfloor r_4 \rfloor$.
</s>