Recall that a *binary code* is a subgroup $C \subset \mathbb F\_2^n$; the elements of $C$ are called *code words*. The *Hamming weight* of a code word $c\in C$ is the number of $1$s in it. A binary code is *self-dual* if $C = C^\perp := \{v \in \mathbb F\_2^n : \langle v,c\rangle = 0\in \mathbb F\_2\}$. Self-dual codes automatically satisfy that all code words have Hamming weight divisible by $2$ (since every element must be orthogonal to itself).


There are many applications for binary codes in which all Hamming weights are divisible by $4$. A famous theorem says that a self-dual code of this type can exist only when $n$ is a multiple of $8$.


Do there exist self-dual codes all of whose Hamming weights are divisible by $8$? What is the smallest one? What dimensions do they exist in?


Note that the binary Golay code, related to the famous Leech lattice, is not of this type, since it has code words with Hamming weight $12$.



Self-dual binary codes of Hamming weight divisible by 8?
Just noticed this question now. No, there are no such self-dual codes
beyond the trivial one of length zero.


One way to see this is to mimic the proof of Gleason's theorem:
the weight enumerator $W\_C(X,Y)$ would have to be invariant under
$(X,Y) \mapsto (2^{-1/2}(X+Y), 2^{-1/2}(X-Y))$ (MacWilliams identity)
and also $(X,Y) \mapsto (X,e^{2\pi i/8} Y)$. But those linear 
transformations generate a subgroup of $U\_2({\bf C})$ 
whose image in $PU\_2({\bf C})$ is dense, so there are
no nonconstant invariant polynomials.
[Replacing $e^{2\pi i/8}$ by $i = e^{2\pi i/4}$ yields
the group for weight enumerators of Type II codes,
whose image in $PU\_2({\bf C})$ is the octahedral group --
which is known to be a maximal closed subgroup of $PU\_2({\bf C})$,
so adding the generator $(X,Y) \mapsto (X,e^{2\pi i/8} Y)$ yields
a dense subgroup.]


