%N Let f be a function on rationals p/q (p,q coprime) defined by f(p/q) = abs(p-q)/g(p), where g(p) is the next odd number (starting with p) that we get after iteration of h(n) = n/2 when n is even, 5n+1 when n is odd. Start with f(n/1) and iterate f until it reaches again an integer, which is a(n). If no integer is reached, then a(n)=0.
%e We get 6/1 -> 5/3 -> 2/13 -> 11/1 so a(6)=11.
%Y Cf. A062366, A063256, A063268.
%A _Floor van Lamoen_, Jul 12 2001