Problem

Source: IMOTC 2014 Practice Test 2 Problem 3

Tags: function, number theory unsolved, number theory



For integers $a,b$ we define $f((a,b))=(2a,b-a)$ if $a<b$ and $f((a,b))=(a-b,2b)$ if $a\geq b$. Given a natural number $n>1$ show that there exist natural numbers $m,k$ with $m<n$ such that $f^{k}((n,m))=(m,n)$,where $f^{k}(x)=f(f(f(...f(x))))$,$f$ being composed with itself $k$ times.