# 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,

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

$$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}\in\mathbb{Z}\text{ (often)}.$$

For example, for $$n = 2$$,

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

$$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$? Commented Sep 28, 2013 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. Commented Sep 28, 2013 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? Commented Sep 29, 2013 at 0:13
• That's a good point. I'll have to check that, too. Commented Sep 29, 2013 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. Commented Sep 29, 2013 at 7:57
• Ah, so that explains why about half the $F(n)$ were integers. Commented Sep 29, 2013 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$. Commented Sep 29, 2013 at 20:56
• @GerryMyerson: do you know if the coefficients of the continued fraction of $\pi$ are bounded? Are they expected to be unbounded (as they are for $e$)? This is probably conjectural… Commented Aug 22, 2016 at 10:20
• @Watson, nobody knows whether the partial quotients for $\pi$ are bounded, but no one has put forward any reason for thinking they are bounded. The consensus is that there's nothing very special going on with the partial quotients for $\pi$. Commented Aug 22, 2016 at 23:27