When is singleton bound better than Hamming bound for a binary code Let $C$ be an $(n,k,d)$ code over $\mathbb{F}_q$, and $A$ the number of codewords. The singleton bound states,
$$A\leq q^{n-d+1}$$
and the Hamming bound states,
$$A\leq\frac{q^n}{\sum_{i=0}^{t} {n\choose i}(q-1)^i}$$
where $t=\lfloor\frac{d-1}{2}\rfloor$ is the number of errors the code can correct.
For a binary code, $q=2$. We thus wish to find, pairs of $n$ and $d$ such that,
$$2^{n-d+1}\leq\frac{2^n}{\sum_{i=0}^{t} {n\choose i}}$$
I know the identity, $\sum_{i=0}^{n} {n\choose i}=2^n$ but I don't know the general identity for $\sum_{i=0}^{t} {n\choose i}$ which would be helpful.
 A: Edit: This answer is for the asymptotic case:
For binary codes, Singleton is always looser than Hamming, i.e., gives a higher upper bound. Just look at a plot of the binomial CDF (cumulative distribution function) with parameter $p=1/2$ and you can see that the "straight line" singleton is above the CDF.
For nonbinary, if you pick an alphabet $q$ that is $n$ or $n+1$ you can have an MDS code [e.g., Reed Solomon] which achieves the Singleton bound. In that case there is a crossover between Hamming and Singleton bounds, viewed asymptotically. There are no binary MDS codes.
As for your other question, there is no closed form for the identity you desire on the partial sums of binomial coefficients for arbitrary $t.$ If  $t<n/3,$ the sequence of binomial coefficients is superincreasing so you can obtain the bounds below for $t$ in this range,
$$
{n \choose t} < \sum_{i=0}^{t} {n\choose i} <{n \choose t+1}
$$
which are pretty effective. A binomial coefficient itself can be further approximated as below:
$$
\sqrt{\frac{n}{8k(n-k)}}2^{nh(k/n)} \leq \binom{n}{k} \leq 
\sqrt{\frac{n}{2\pi k(n-k)}}2^{nh(k/n)}
$$
where $h$ is the binary entropy function in bits. If you bring the quantity inside the squareroot to the exponent you have a correction of type $\log n$ in the exponent.
See this answer for details. You can also use this to show Singleton is looser than Hamming, but it's overkill.
A: This answer is for finite $t,n$ since as indicated in my other answer, asymptotically Hamming always beats Singleton for binary codes.
Edit: Hamming always beats Singleton for finite $t$ and $n$ as well.
If the inequality
$$2^{n-d+1}\leq\frac{2^n}{\sum_{i=0}^{t} {n\choose i}}
\Leftrightarrow
{\sum_{i=0}^{t} {n\choose i}} \leq 2^{d-1}
$$
is satisfied let us say (by breaking possible ties) that the Singleton bound is better than the Hamming bound.
First note that the sum
$$
S(n,t)={\sum_{i=0}^{t} {n\choose i}}
$$
is strictly increasing in $n$ and $t.$ Therefore for fixed $t,$ one can increase $n$ until Hamming beats Singleton.
If $t=1$ even if $n=1$ we have $n+1\leq 2,$ so Hamming always beats Singleton (for all $n$).
Now assume $t\geq 2.$ Edit: Since $d$ is either $2t$ or $2t+1$ and $d\leq n$ must hold the proposition proves that Hamming always beats Singleton for binary codes.
Proposition: Hamming beats singleton if $n\geq 2t.$
Case 1: $d=2t+1:$ Hamming beats Singleton if
$$
S(n,t)={\sum_{i=0}^{t} {n\choose i}} \leq 2^{2t}.
$$
Claim: For $t\geq 2,$ Hamming beats Singleton until $n\geq 2t.$ To see this keep increasing $n.$ When $n=2t$ we have the sum of binomial coefficients ${n \choose k}={2t \choose k}$  for $k$ up to and including the middle coefficient $t.$ We know that this is half the total binomial sum so is either more than or equal to $\frac{1}{2}2^{2t}=2^{2t-1}$ depending on whether $t$ is even or odd.
Case 2: $d=2t$ which means Hamming beats Singleton if
$$
S(n,t)={\sum_{i=0}^{t} {n\choose i}} \leq 2^{2t-1}.
$$
This condition is tighter, so it is possible that Hamming will beat Singleton possibly earlier. Let us pick $n=2t-1,$ then we have
$$
S(n,t)=S(2t-1,t)={\sum_{i=0}^{t} {2t-1\choose i}} =2^{2t-2}
$$
which means Hamming does not beat Singleton when $n=2t-1.$ But it does if we increase $n$ by $1$ since the sum $S(2t,t)$ will now include the middle Binomial coefficient.
