Let b(0) = n, b(2*k+1) = c, where c > b(m) is the smallest number such that gcd(c,b(2*k))=1, b(2*k+2) = e where e < b(m) is the smallest number such that gcd(e,b(2*k+1))=1 for m = 0..2*k, until reaching e = 1. Then a(n) = the last c.

A084425

Let b(0) = n, b(2*k+1) = c, where c > b(m) is the smallest number such that gcd(c,b(2*k))=1, b(2*k+2) = e where e < b(m) is the smallest number such that gcd(e,b(2*k+1))=1 for m = 0..2*k, until reaching e = 1. Then a(n) = the last c.

Terms

    a(0) =3a(1) =4a(2) =9a(3) =6a(4) =10a(5) =10a(6) =12a(7) =12a(8) =16a(9) =25a(10) =18a(11) =18a(12) =31a(13) =26a(14) =26a(15) =28a(16) =41a(17) =34a(18) =30a(19) =30a(20) =36a(21) =40a(22) =42a(23) =42a(24) =42a(25) =42a(26) =50a(27) =48a(28) =50a(29) =56

External references