OFFSET
1,1
COMMENTS
This is +2 at the bit position of the odd part of n, that being the least significant 1-bit.
The least significant run of 1-bits changes from 0111..111 in n to 1000..001 in a(n).
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
n = 3448 = binary 1101 0111 1 000
a(n) = 3464 = binary 1101 1000 1 000
MATHEMATICA
Array[# + 2^(IntegerExponent[#, 2] + 1) &, 67] (* Michael De Vlieger, Mar 27 2022 *)
PROG
(PARI) a(n) = n + 2<<valuation(n, 2);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Kevin Ryde, Mar 26 2022
STATUS
approved