# Prove that this iteration cuts a rational number in two irrationals $\sum_{n=0}^\infty \frac{1}{q_n^2-p_n q_n+1}+\lim_{n \to \infty} \frac{p_n}{q_n}$

For any $$1 \leq p we have:

$$\frac{p}{q}=\frac{1}{q^2-p q+1}+\frac{(q-p)(pq-1)}{q(q^2-p q+1)}$$

Let's consider an iteration:

$$p_{n+1}=(q_n-p_n)(p_nq_n-1)$$

$$q_{n+1}=q_n(q_n^2-p_n q_n+1)$$

Then we have: $$\frac{p_0}{q_0}=\sum_{n=0}^\infty \frac{1}{q_n^2-p_n q_n+1}+\lim_{n \to \infty} \frac{p_n}{q_n}$$

The above is trivially true, provided both limits exist separately. But it turns out numerically that both the sum and the limit are finite and (seemingly) irrational. Let's denote:

$$A(p_0,q_0)=\sum_{n=0}^\infty \frac{1}{q_n^2-p_n q_n+1}$$

$$B(p_0,q_0)=\lim_{n \to \infty} \frac{p_n}{q_n}$$

$$A(p_0,q_0)+B(p_0,q_0)=\frac{p_0}{q_0}$$

We have (I will only write $$A$$, since $$B$$ can be obtained by subtraction):

$$A(1,2)=0.365624790175942982737859474249681505 \dots$$

$$A(1,3)=0.145650460727123812176794888179825955 \dots$$

$$A(2,3)=0.261766321023330525617942741920174815 \dots$$

$$A(3,4)=0.205525029400010131449324836277780238 \dots$$

Moreover, since we define 'numerators' and 'denominators' separately, we obtain different results for $$A(mp_0,mq_0)$$:

$$A(2,4)=0.1123721471627326977547524155555190359 \dots$$

$$A(3,6)=0.0527707965471706424044987365216530762 \dots$$

$$A(4,8)=0.0303300858480840619918350602972694890 \dots$$

$$A(4/3,8/3)=0.228842771329071793825717533784828873 \dots$$

I haven't been able to find a closed form for any of $$A,B$$ I tried.

However, it seems likely they are irrational. If it's true and there is no known closed form, then we can produce an infinite number of pairs of irrationals $$A,B$$ which sum to a particular rational number nontrivially.

My questions are:

• Can we prove that $$A,B$$ are irrational for rational $$p_0,q_0$$?

• Is there any closed form for $$A,B$$ in terms of $$p_0,q_0$$?

• Are the values of $$A,B$$ unique for every distinct pair of $$p_0,q_0$$?

A sketch of a proof of existence for $$B$$ (note that we assume $$p_0,q_0 \in \mathbb{N}$$ and $$1 \leq p_0 \leq q_0-1$$):

$$p_{n+1}=(q_n-p_n)(p_nq_n-1) \geq p_n^2+p_n-1$$

$$q_{n+1}=q_n+q_n^2(q_n-p_n) \geq q_n^2+q_n$$

We can see that $$p_n,q_n$$ are non-decreasing, and for $$n>1$$ they are increasing (because $$q_n$$ is strictly increasing and it 'helps' $$p_n$$ after the first step).

For $$n \to \infty$$ we have $$p_n \to \infty$$ and $$q_n \to \infty$$, thus:

$$\frac{p_{n+1}}{q_{n+1}}=\frac{(q_n-p_n)(p_nq_n-1)}{q_n(q_n^2-p_n q_n+1)} \approx \frac{p_n}{q_n}$$

It is apparent the limit exists.

The limit for $$A$$ exists because the sequence $$q_n^2-p_n q_n+1$$ grows much faster than $$n^2$$ and the sum obviously converges.

Update

A little something on a closed form. The system of recurrence relations can be rewritten as a single recurrence relation, using:

$$p_n=q_n+\frac{1}{q_n}-\frac{q_{n+1}}{q_n^2}$$

Then we have a second order recurrence relation:

$$q_{n+2}=q_{n+1}(q_{n+1}q_n+1)+\frac{q_{n+1}^3}{q_n^2} \left(\frac{q_{n+1}}{q_n}-1 \right)$$ $$q_0=q_0, \qquad q_1=q_0(q_0^2-q_0 p_0+1)$$

Or a more symmetric form:

$$\frac{q_{n+2}}{q_{n+1}}=q_{n+1}q_n+1+\frac{q_{n+1}^2}{q_n^2} \left(\frac{q_{n+1}}{q_n}-1 \right)$$

If we find a closed form for it (which I'm not sure exists) we can take the limit and find the closed form for $$B$$.

We also have a more simple looking relation (but it still requires us to know $$q_n$$):

$$\frac{p_n}{q_n}=1+\frac{1}{q_{n-1}^2}-\frac{q_{n-1}}{q_n}-\frac{q_n}{q_{n-1}^3}$$

And in fact, we can also write $$A$$ in terms of $$q_n$$:

$$A=\sum_{n=0}^\infty \frac{q_n}{q_{n+1}}$$

Update 2

Getting rid of some unnecessary parts, we can reformulate the problem:

Set some $$q_1>q_0>0$$. Then we can define a second order recurrence:

$$q_{n+2}=q_{n+1}(q_{n+1}q_n+1)+\frac{q_{n+1}^3}{q_n^2} \left(\frac{q_{n+1}}{q_n}-1 \right)$$

With the following property: $$L(q_0,q_1)-S(q_0,q_1)=\lim_{n \to \infty} \frac{q_{n+1}}{q_n^3}- \sum_{n=0}^\infty \frac{q_n}{q_{n+1}}=\frac{q_1-q_0}{q_0^3}$$

Can we find a closed form for the recurrence? Or separately for the limit $$L$$ or the sum $$S$$ above?

Note that for the limit $$L$$ to be finite we need to have as $$n \to \infty$$:

$$q_n \asymp C \cdot a^{3^n}$$

For example we have:

$$S(1,2)=0.645953147800624278311945190231458547= \\ = \frac{1}{2}+\frac{1}{7}+\frac{1}{323}+\frac{1}{33657247}+\frac{1}{38127274806076464952763}+\dots$$

No closed form for this number either, however look at the denominator sequence - all the numbers end with $$3$$ or $$7$$. This pattern continues as far as I can see.

• How did you come up with the initial decomposition? Feb 7 '17 at 20:59
• @martycohen, that's a very interesting story. First I considerend the inequality: $$\frac{p-m}{q-m} < \frac{p}{q} < \frac{p+m}{q+m}$$ Then I subtracted: $$\frac{p}{q}-\frac{1}{2} \left( \frac{p-m}{q-m}+\frac{p+m}{q+m}\right)$$ Then I set $$m^2=pq-1$$ There may have been some other steps inbetween. Anyway, the discovery of $A,B$ was accidental Feb 7 '17 at 21:02

As an answer for the question in the title I propose the following (using the results from the OP):

$$A=\sum_{n=0}^\infty \frac{q_n}{q_{n+1}} \tag{1}$$

We have:

$$\frac{q_{n+2}}{q_{n+1}}=q_{n+1}q_n+1+\frac{q_{n+1}^2}{q_n^2} \left(\frac{q_{n+1}}{q_n}-1 \right) \tag{2}$$

Set $a_n=\frac{q_n}{q_{n-1}}$ and $b_n=q_{n-1}q_{n-2}+1$, then we have:

$$a_n=q_{n-1}q_{n-2}+1+a_{n-1}(a_{n-1}-1):=a_{n-1}(a_{n-1}-1)+b_{n-1}$$

Thus, according to this paper: The Approximation of Numbers as Sums of Reciprocals, the sum in $(1)$ is the greedy expansion of the number $A$:

$$A=\sum_{n=1}^\infty \frac{1}{a_n}$$

According to the paper, every such expansion for a real number has the form:

$$x=\frac{1}{a_1}+\frac{1}{a_2}+\dots$$

$$a_{k+1}=a_k(a_k-1)+b_k,~~~a_1 \geq 2,~~b_k > 1,~~~~a_k,b_k \in \mathbb{N}$$

All of the requirements are met. (To prove that $a_n$ are all integers we only need to look at the initial definition of $q_n$).

And since the greedy expansion for a rational number is finite, but the sequence $a_n$ is not, we have proved that $A$ is irrational.

• Though a bit hard to follow at times, for what it's worth, I have read the OP carefully and also the linked paper, and confirm that this solves the problem. Feb 8 '17 at 22:43
• Very interesting problem by the way! Feb 8 '17 at 22:44
• @Fimpellizieri, thank you for checking! I tend to get carried away, sorry for not being clear enough. I should spend more time on my posts Feb 10 '17 at 14:51

Suppose the limit $B$ exists and is rational, $B=\frac{p}{q}$. Then we should have $$\frac{p}{q} = \frac{(q-p)(pq-1)}{q(q^2-pq+1)}.$$

But the only solution to this is $q=0$, hence the limit cannot be rational.

• Can it really be that simple? Seems like it is, thank you Feb 8 '17 at 12:40
• I am unsure myself to be honest. Feb 8 '17 at 12:43
• I don't think so. There is no obvious reason why the $p, q$ in the iteration is the $p, q$ in the fraction. Feb 8 '17 at 19:58
• @martycohen, what if we multiply the right hand side by $n/n$ and try to find rational $p,q,n$? Feb 8 '17 at 20:09
• Perhaps the fact that $\gcd(p_n,q_n)=1$ can be useful? Assuming of course that $\gcd(p_0,q_0)=1$. Feb 8 '17 at 20:53