Consider the code $L$ with size $n=q+2$ and dimension $k=q-1$, where $q=p^m$ and $m$ is an integer.
I have to prove that $p=2$ if $L$ is an MDS code.
So we assume that $L$ is MDS. Thus by definition of MDS, $L$ is a $[n, k, n-k+1]=[p^m+2, p^m-1, p^m+2-(p^m-1)+1]=[p^m+2, p^m-1, 4]$-code.
If it is correct, I am unsure on how to proceed. There is a theorem in my notes that states that if a nontrivial $[n,k]$-code exists, then $n-q+1 \le k \le q-1 => (p^m+2)-(p^m)+1 \le p^m - 1 \le (p^m)-1 => 3 \le p^m - 1 => 4 \le p^m$.
This is satisfied by $p=2$ for $m>1$, however why can we assume that $m>1$? If not then it could be satisfied by $p=4$ for all $m$, but $4$ is not prime.
I am not sure this is the right method. Any help is appreciated, thank you! Does the MDS conjecture have a role in this? Could I still use that theorem?
By duality we prove that there doesn't exist any $[p^m+2,3,p^m]_{p^m}$ MDS code with $p\ne 2$. Consider its generator matrix in standard form: $$ G=(I_3|A)=\begin{pmatrix} 1 & 0 &0 &1&1&\cdots&1\\ 0 & 1 & 0 &* & * &\cdots & *\\ 0 & 0 & 1 &* & * &\cdots & * \end{pmatrix} $$ (Every $k$ columns of the generator matrix of a $[n,k]$ MDS code must be linearly independent. Hence the columns of $A$ mustn't contain any zero, otherwise such a column will be the linear combination of certain $k-1$ columns from the first $k$ columns. Furthurmore we can suppose that the first row of $A$ are $1$, since multiplying a coordinate with a nonzero constant does not harm MDS.)
Still, from the fact that every $k$ columns of $G$ are linearly independent, we can see that the second and third rows of $A$ must be a permutation of all elements from $\mathbb{F}^\times$, i.e. mustn't have two elements of the same value. By reordering we suppose that $$ A=\begin{pmatrix} 1 & 1 & \cdots & 1\\ \theta^0 & \theta^1 &\cdots &\theta^{p^m-2}\\ \theta^{\pi(0)} & \theta^{\pi(1)} & \cdots &\theta^{\pi(p^m-2)} \end{pmatrix}, $$ where $\theta$ is the generator of the multiplicative group $\mathbb{F}^\times$, and $\pi:\{0,\ldots,p^m-2\}\to \{0,\ldots,p^m-2\}$ a permutation. Again the linear independence of $(1,0,0),(1,\theta^i,\theta^{\pi(i)}),(1,\theta^j,\theta^{\pi(j)})$ implies that $\theta^{\pi(i)-i}\ne \theta^{\pi(j)-j}$. Hence $\{\pi(i)-i\}_{i=0}^{p^m-2}=\{0,1,\ldots,p^m-2\}$ (considered $\bmod (p^m-1)$). Now we sum up all elements of the two sets: $$ 0=\sum i-\sum i=\sum pi(i)-\sum i=\sum_{a\in \{\pi(i)-i\}} a \equiv \sum_{a\in\{0,\ldots,p^m-2\}} a=\frac12(p^m-2)(p^m-1)\pmod{(p^m-1)}.$$ If $p\ne 2$, then $p^m-1$ is even and $\gcd(p^m-1,p^m-2)=1$. Hence $$ (p^m-1)\nmid\frac12(p^m-2)(p^m-1). $$ Contradiction. Therefore we must have $p=2$.