# A strange “pattern” in the continued fraction convergents of pi?

From the simple continued fraction of $\pi$, one gets the convergents,

$$p_n = \frac{3}{1}, \frac{22}{7}, \frac{333}{106}, \frac{355}{113}, \frac{103993}{33102}, \frac{104348}{33215}, \frac{208341}{66317}, \frac{312689}{99532}, \frac{833719}{265381}, \frac{1146408}{364913}, \dots$$

starting with $n=1$, where the numerators and denominators are A002485 and A002486, respectively. If you stare at it hard enough, a pattern will emerge between three consecutive convergents. Define,

$$a_n,\,b_n,\,c_n = p_{n}-3,\;\; p_{n+1}-3,\;\; p_{n+2}-3$$

$$v_n=\text{Numerator}\,(a_n)\,\text{Numerator}\,(b_n)$$

then for even $n \ge 2$,

$$F(n) = \sqrt{\frac{a_n c_n}{a_n-c_n}-v_n}=\text{Integer}\, (often)$$

For example, for $n = 2$,

$$a_2,\,b_2,\,c_2, = \frac{22}{7}-3,\; \frac{333}{106}-3,\; \frac{355}{113}-3$$

$$F(2) = 1$$

More generally,

$$\begin{array}{cc} n&F(n) \\ 2&1 \\ 4&16\\ 6&4703\\ 8&14093\\ 10&51669\\ 12&122126\sqrt{2}\\ 14&7468474\\ 16&\frac{18549059}{\sqrt{2}}\\ \end{array}$$

and so on. For even $n<100$, I found half of the $F(n)$ were either integer or half-integer. (And all the non-integers were of form $N\sqrt{d}$ for some very small d.)

Some questions:

1. For $n<500$, $n<1000$, etc, how many $F(n)$ are integers or half-integers?
2. More importantly, why is $F(n)$ often an integer?
-
Is $\pi$ special? Does a similar pattern hold for $\sqrt{2}$ or $e$? – Calvin Lin Sep 28 '13 at 22:07
Now why didn't I think of that? I checked and a similar pattern exists for $e$, as well as for $\sqrt{2}$ (though I have to check if there's a bug in Mathematica). But it seems the special one is $\sqrt{5}$ since apparently all the $F(n)$ are integers and a subset of the Fibonacci numbers. – Tito Piezas III Sep 28 '13 at 23:55
Is there any correlation between the partial quotients and the (near-)integrality of $F$? Say, if the $n$th partial quotient is 1, then $F(n)$ is an integer? – Gerry Myerson Sep 29 '13 at 0:13
That's a good point. I'll have to check that, too. – Tito Piezas III Sep 29 '13 at 0:23

The $q_n = p_n-3$ are the convergent fractions of $\pi-3$ (it really doesn't matter to do this change by the way, you could have started straight from $\pi$, only by picking $n \ge 3$ odd instead of $n \ge 2$ even)

3 consecutive convergent fractions are of the form $\frac ab, \frac cd, \frac{a+kc}{b+kd}$ for some integers $a,b,c,d,k$ and $ad-bc=1$ (because we picked $n$ even).

$F(n) = \sqrt{\frac {a(a+kc)}{a(b+kd)-b(a+kc)}-ac} = \sqrt{\frac{a^2+kac}k-ac} = a/\sqrt k$

From the wikipedia page of $\pi$ I can only see the first $3$ relevant $k$, and they are all $1$, so $F(n) = numerator(a_n)$ for $n=2,4,6$ at least.

-
And here $k$ is a partial quotient, and it is believed that about 41% of the partial quotients for $\pi$ are 1. – Gerry Myerson Sep 29 '13 at 7:57
Ah, so that explains why about half the $F(n)$ were integers. – Tito Piezas III Sep 29 '13 at 15:43
@mercio, can you kindly look at this post on the asymptotics of $a^3+b^3 = c^3\pm 1$, since you were able to answer the one on $a^2+b^2 = c^2\pm 1$. – Tito Piezas III Sep 29 '13 at 20:56
@GerryMyerson: You may be interested in this post. It seems that 41% of the partial quotients of other constants are also 1. – Tito Piezas III Jul 14 '15 at 7:34
I know that, Tito. Although of course it's still conjectural for $\pi$. – Gerry Myerson Jul 14 '15 at 9:24