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) = (Sum_{0<=k<=m} b(k)) - 1 for n > 1, where m is the smallest index such that b(m) = 1; a(1) = 1.

A137604

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) = (Sum_{0<=k<=m} b(k)) - 1 for n > 1, where m is the smallest index such that b(m) = 1; a(1) = 1.

Terms

    a(0) =1a(1) =2a(2) =3a(3) =6a(4) =7a(5) =15a(6) =21a(7) =14a(8) =15a(9) =45a(10) =30a(11) =66a(12) =63a(13) =61a(14) =105a(15) =30a(16) =31a(17) =102a(18) =171a(19) =114a(20) =93a(21) =63a(22) =134a(23) =276a(24) =258a(25) =88a(26) =351a(27) =270a(28) =105a(29) =435

External references