Pascal's Triangle and Binary Representations

Another approach uses generating functions (for a similar example, see the proof of Lucas's Theorem). Let $p(x) = \sum_{k=0}^n\binom{n}{k}x^k$. It is easy to check that for primes $p$ and nonnegative integers $k$, we have $(1+x)^{p^k}\equiv 1 + x^{p^k}\pmod p$. Then $$p(x) = (1+x)^n = \prod_{i=0}^t \left((1+x)^{2^i}\right)^{b_i} \equiv \prod_{i=0}^t \left(1+x^{2^i}\right)^{b_i}\pmod 2.$$ Thus $\binom{n}{2^j}$ is congruent to the coefficient of $x^{2^j}$ in $\prod_{i=0}^t \left(1+x^{2^i}\right)^{b_i}$ mod $2$. Since all the $b_i$ are 0 or 1, the coefficient of $x^{k}$ in $\prod_{i=0}^t \left(1+x^{2^i}\right)^{b_i}$ is the number of ways to write $k=2^{i_1}+2^{i_2}+\cdots+2^{i_m}$ for some $i_1<i_2<\cdots<i_m$ where $b_{i_1}=b_{i_2}=\cdots=b_{i_m} = 1$. Since binary representation is unique, all the coefficients of $\prod_{i=0}^t \left(1+x^{2^i}\right)^{b_i}$ are 0 or 1. In particular, the coefficient of $x^{2^j}$ is 1 if $b_j=1$ and 0 if $b_j=0$, so we have $b_j\equiv \binom{n}{2^j}\pmod 2$.

I believe by the same argument you can show for all primes $p$, writing $n=\overline{b_tb_{t-1}\dots b_0}_p$ in base $p$, we have $$b_j\equiv\binom{n}{p^j}\pmod p. $$

EDIT: For this problem and the problem for general $p$ you can actually can just apply Lucas's Theorem directly: $$\binom{n}{p^j} \equiv \prod_{i=0}^t\binom{b_i}{[i=j]}\equiv b_j\pmod p$$ where we denote $[i=j]$ to be 1 if $i=j$ and 0 otherwise.