Let $s_2(n)$ be the sum of base-$2$ digits of $n.$ Let $r$ be the final $1$s in the binary expansion of $n.$ So for instance if we have $n= 1010111 = w01^3$ where $w$ is an arbtriray binary string then $r= 3.$
Then is true that $s_2(n+1) = s_2(n)-r+1?$ I tried to show this in the following way: say we have $n=w01^r$ then $n+1 = w10^r.$ This immediately yields the equality. Is this argument correct?