# Another really neat theorem!

This is not for help or anything; just a neat factoid. The number of odd numbers in the nth row of pascal's triangle is $2^k$, where k is the the number of ones occuring in the binary representation of n.
The generalization of this theorem is that if $n = a_m a_{m-1}... a_0$ the representation of $n$ in base prime $p$ , then the number of the binomial coefficients which are prime to $p$ is $(a_0 + 1 )(a_1 + 1 )...(a_m + 1 )$ .