a(1)=0. a(n) is the smallest integer > a(n-1) such that both a(n) and a(n)-a(n-1) have the same number of 1's when written in binary as n has when it is written in binary.

A162951

a(1)=0. a(n) is the smallest integer > a(n-1) such that both a(n) and a(n)-a(n-1) have the same number of 1's when written in binary as n has when it is written in binary.

Terms

    a(0) =0a(1) =1a(2) =6a(3) =8a(4) =17a(5) =20a(6) =41

External references