[Math] Total number of odd numbers in a row of Pascal’s triangle is a natural power of two

combinatoricscontest-mathdiscrete mathematics

This seems like a combinatorial problem so there might be something simple that hasn't struck me.
Although I do have an idea but I am unable to proceed from it.
The statement of the question is:

Prove that in any row of Pascal's triangle, the number of odd elements is $2^k$, for some $k \in \mathbb{N}$.

I was working on a Pascal's triangle but in a binary format, where two adjacent 1's add up to 0. Something of the sort:

                 1
               1   1
             1   0   1
           1   1   1   1
         1   0   0   0   1
       1   1   0   0   1   1

It is a definitive sequence and the thing I liked about it was that you can add up the adjacent 1's in a row to get the number of odd elements, but I haven't been able to generalize this information.
I was thinking along the lines of a recursive relation in polynomials whose coefficients would represent the rows of this triangle, then I can just feed 1 into the equation and inductively prove that it is a perfect power of 2.

Can someone help me out on a proof along these lines, if I'm going in the right direction here?

P.S. I know there is the modulo 2 proof but can someone help me generalize that binary pascal's triangle?

Best Answer

Similar idea to Andreas Caranti's answer:

Kummer's Theorem says that the number of factors of $p$ in $\binom{n}{k}$ is the number of carries when adding $k$ and $n-k$ in base-$p$. There are no carries when adding $k$ and $n-k$ in binary if and only if $k\veebar n-k=0$; when that is true, $n=k\lor n-k$. This means that $\binom{n}{k}$ is odd when the $1$ bits of $k$ are a subset of the $1$ bits of $n$. That is, there are $2^{\sigma_2(n)}$ odd entries in row $n$ of Pascal's Triangle, where $\sigma_2(n)$ is the sum of the bits in the binary representation of $n$.