Consider the sequence: b(0) = n, and for k >= 1, b(k) = b(k-1)/2 if b(k-1) is even, otherwise b(k) = n - (b(k-1)+1)/2. Then a(n) = m, where m is the smallest index such that b(m) = 1.

A137605

Consider the sequence: b(0) = n, and for k >= 1, b(k) = b(k-1)/2 if b(k-1) is even, otherwise b(k) = n - (b(k-1)+1)/2. Then a(n) = m, where m is the smallest index such that b(m) = 1.

Terms

    a(0) =0a(1) =1a(2) =1a(3) =2a(4) =2a(5) =4a(6) =5a(7) =3a(8) =3a(9) =8a(10) =5a(11) =10a(12) =9a(13) =8a(14) =13a(15) =4a(16) =4a(17) =11a(18) =17a(19) =11a(20) =9a(21) =6a(22) =11a(23) =22a(24) =20a(25) =7a(26) =25a(27) =19a(28) =8a(29) =28

External references