Low-weight coefficients of a binary Hamming code (source code)

= Low-weight coefficients of a binary Hamming code
{title2=$A_3=\frac{n(n-1)}6,\quad A_4=\frac{n(n-1)(n-3)}{24},\quad A_5=\frac{n(n-1)(n-3)(n-7)}{120}$}

For $n=2^\ell-1$, a <codeword> in a <Hamming code> is a subset of the nonzero <vectors> of $\mathbb F_2^\ell$ whose sum is zero. Ordered weight-three <supports of a vector> are determined by two distinct nonzero <vectors>, giving $n(n-1)$ choices. For weight four, the third <vector> must avoid the three nonzero <vectors> in the <linear span> of the first two, giving $n(n-1)(n-3)$ choices. For weight five, the first three must be linearly independent, and the fourth must avoid all seven nonzero <vectors> in their <linear span>, giving $n(n-1)(n-3)(n-7)$ choices. The final <vector> is their sum. Dividing by $3!$, $4!$, and $5!$ counts unordered <supports of a vector> and proves the displayed <weight enumerator> coefficients.