2

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?

MJD
  • 62,206
  • 36
  • 276
  • 489
Mark
  • 7,280
  • 6
  • 30
  • 64
  • 2
    It is a coincidence that for a while each partial quotient is one more than twice the preceding one. The partial quotients for $\pi$ have no known pattern, and none is expected. – Gerry Myerson Aug 25 '14 at 07:27
  • Also related: [Continued fraction of a square root](http://math.stackexchange.com/q/265690/25554) explains how to calculate continued fractions. – MJD Aug 25 '14 at 15:11

1 Answers1

1

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$.

Robert Israel
  • 416,382
  • 24
  • 302
  • 603
  • If you are doing this for $\pi$ with a calculator, produce $\pi$ *in your calculator*. If you have a scientific calculator, use the $\pi$ key. The reason for this is that internally, the calculator keeps $1$ or $2$ *guard digits*. Informally, it knows $\pi$ to greater accuracy than it displays. Then subtract $\lfloor \pi\rfloor$ *in your calculator*, and invert with the $1/x$ key in your calculator, write down the greatest integer in the answer, subtract that in your calculator, and so on. – André Nicolas Aug 25 '14 at 06:21
  • ... and the accuracy you need increases as this process goes on. – Robert Israel Aug 25 '14 at 06:25