Copyright © University of Cambridge. All rights reserved.
'Loopy' printed from https://nrich.maths.org/
Sunil sent us his work on this problem:
When I tried this out, no matter what numbers I started with, I always seemed to find that the $6$th term was the same as the $1$st term, and the $7$th the same as the $2$nd, so it kept repeating. I used a spreadsheet to help me do the calculations! Then I used algebra to try to explain why it worked.
The first term is $a_1$.
The second term is $a_2$.
The third term is $\frac{1+a_2}{a_1}$.
The fourth term is $\frac{1+a_1+a_2}{a_1 a_2}$.
The fifth term is $\left(\frac{1+a_1+a_2+a_1 a_2}{a_1 a_2}\right)\times\left(\frac {a_1}{1+a_2}\right)=\left(\frac{(1+a_1)(1+a_2)}{a_1 a_2}\right)\times\left( \frac{a_1}{1+a_2}\right)=\frac{1+a_1}{a_2}$.
The sixth term is $\left(\frac{1+a_1+a_2}{a_2}\right)\times\left(\frac{a_1 a_2} {1+a_1+a_2}\right)=a_1$.
The seventh term is $\left(a_1+1\right)\times\left(\frac{a_2}{1+a_1}\right)=a_2$.
This explains why the pattern always works, no matter what you start with! (As long as the bottom is never $0$, so we can't have $a_1=0$, or $a_2=0$, or $a_1=-1$, or $a_2=-1$, or $a_1+a_2=-1$.)