The cardinality of a Hamming ball is the total number of elements that are any distance up to and including its radius.
The number of vectors in Hamming ball is
Proof
Recall the definition for :
N.b. on a binary code in the Hamming space can only be an integer .
By Hamming distance for binary codes can be calculated using the binomial coefficient.,
is the number of elements of that are distance from
is the number of elements of that are distance from
is the number of elements of that are distance from
QED