Question 34
Given a natural number $n$, the sum of the digits of the number $n$, expressed in the binary numbering system, is designated by $s(n)$, that is, the number of digits 1 that has. Determine, for all natural numbers $k$ $$
\sigma(k)=s(1)+s(2)+\cdots+s\left(2^{k}\right)
$$
\sigma(k)=s(1)+s(2)+\cdots+s\left(2^{k}\right)
$$