OFFSET
0,7
COMMENTS
In binary expansion (A007088) of n, clear the most significant bit and all those 1-bits that have another 1-bit at their left side, except for the second most significant 1-bit, even in cases where the binary expansion begins as "11...".
Because A292943(n) = a(A243071(n)), the sequence works as a "masking function" where the 1-bits in a(n) (always a subset of the 1-bits in binary expansion of n) indicate which numbers are of the form 6k+3 (odd multiples of three) in binary tree A163511 (or its mirror image tree A005940) on that trajectory which leads from the root of the tree to the node containing A163511(n).
LINKS
FORMULA
EXAMPLE
For n = 23, 10111 in binary, when we clear (change to zero) the most significant bit (always 1) and also all 1-bits that have 1's at their left side, we are left with 100, which in binary stands for 4, thus a(23) = 4.
For n = 27, 11011 in binary, when we clear the most significant bit, and also all 1-bits that have 1's at their left side except the second most significant, we are left with 1010, which in binary stands for ten, thus a(27) = 10.
PROG
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Sep 28 2017
STATUS
approved