is the recursive function $(x_1+x_2)/(x_2-x_1) = x_3$ ever get to a point where it divides by $0$ if the starting conditions are$ x_1 = 1, x_2= 2$?

137 Views Asked by At

lets make a function that has 2 inputs the last value given by the formula $x_2$ and the second to last value given $x_1$ where the new $x_2$ is $(x_2+x_1)/(x_1-x_2)$ and de new $x_2$ is the past $x_2$. I did this in python for 7 million integers and in never encountered a point where y/0 happened yet my question is will this always hold up to infinty or will it ever return undefined? code

import matplotlib.pyplot as plt
import math
x = 1
y = 2
graph = []
for i in range(1,700000):
   z = y
   y = ((x+y/(y-x)))
   x = z
   graph.append(x)

plt.plot(graph)
plt.show()

here is the graph of the sequence given:

img

1

There are 1 best solutions below

0
On BEST ANSWER

I love this question, and if I could give you more than one plus-point for it, I would.

When I did the computation exactly, with rational numbers, I saw that you cold not possibly have done it seventy thousand times without using floating-point real calculation, since the integral numerators and denominators of the corresponding rationals get immense very soon. What you need is a combinatorial or algebraic argument. And here it is, but I have to give some background.

The system of rational numbers with odd denominators is a ring, i.e. closed under addition, subtraction, and multiplication. The commonest way of denoting this ring is $\Bbb Z_{(2)}$. The important thing about it is that there’s only one maximal ideal, namely the principal ideal generated by $2$. So it makes sense to speak of “units”, which are the rational numbers with both numerator and denominator odd; and of non units, which are those with even numerator; and to measure the “$2$-order” of a number, namely write it in the form $2^n\frac rs$ where $r$ and $s$ both are odd, $n\ge0$. The units have $n=0$; and you see that $\frac rs$ is a unit. The $2$-orders behave nicely: $\text{ord}_2(zw)=\text{ord}_2(z)+\text{ord}_2(w)$, which should be obvious. Perhaps less obvious is that $\text{ord}_2(z+w)\ge\min\bigl(\text{ord}_2(z),\text{ord}_2(w)\bigr)$, if you allow $\text{ord}_2(0)=+\infty$.

You can ignore almost all of what’s in the preceding paragraph; but if you’ve never seen this stuff before, you have to persuade yourself that even though we’re no longer dealing with integers, it does make sense to work modulo $2^N$ for a given $N$. Not only that, notice that when we work modulo $2n$, we have the nice multiplication and division rules \begin{align} (1+2^mz)(1+2^mw)&\equiv1+2^m(z+w)\pmod{2^{2m}}\\ \frac{1+2^mz}{1+2^nw}&\equiv1+2^m(z-w)\pmod{2^{2m}}\,. \end{align} If this is the first time you’ve seen this kind of stuff, you must verify these rules for yourself, pencil and paper. For, I’m going to be using them repeatedly.

Now, what I noticed when I did $2$-adic computations was that every third number in your sequence was not only even, but more and more highly divisible by $2$ as the indices increased by threes, and that observation gave rise to the proof you see below.

Recall that your recursion is $x_{n+1}=(x_n+x_{n-1})\big/(x_n-x_{n-1})$. I’m going to start with $x_0$ odd, and $x_1$ even, in particular, I’m going to suppose that there is a unit $u$ and a $\Bbb Z_{(2)}$-number $z$ such that $x_{n-1}=1+2^mz$ and $x_n=2^mu$. In your setup, $m=n=1$, $z=0$, and $u=1$.

I’m about to show that $x_{n+3}=2^{m+1}u'$, and I’m going to work modulo $2^{2m}$. And so we start: \begin{align} x_{n-1}&=1+2^mz\\ x_n&=2^mu\\ x_{n+1}&=\frac{1+2^mu+2^mz}{-1+2^mu-2^mz}=-\frac{1+2^mu+2^mz}{1-2^mu+2^mz} \equiv-(1+2^{m+1}u)\pmod{2^{2m}}\\ x_{n+2}&\equiv\frac{-1-2^{m+1}u+2^mu}{-1-2^{m+1}u-2^mu} \equiv\frac{1+2^{m+1}u-2^mu}{1+2^{m+1}u+2^mu} \equiv1-2^mu-2^mu\equiv1-2^{m+1}u\\ x_{n+3}&\equiv\frac{1-2^{m+1}u-1-2^{m+1}u}{1-2^{m+1}u+1+2^{m+1}u} =\frac{-2^{m+2}u}{2}=-2^{m+1}u\,, \end{align} in which all congruences are modulo $2^{2m}$, and I really did mean those two equals signs in the last line, not that it particularly matters.

What matters is that $x_{n+3}=-2^{m+1}u+2^{2m}w$ for some $\Bbb Z_{(2)}$-number $w$, so that the $2$-order of $x_{n+3}$ is one greater than that of $x_n$. You’ll remember that with $x_0=1$, $x_1=2$, you got $x_4=4$ and $x_7=-56/61$. And you’ll notice that none of the other $x_i$ in my computation can be zero. Similarly the $2$-order of $x_{n+2}-1$ is at least $m+1$. So your original question, whether any $x_i=x_{i+1}$, is answered in the negative.