Sudhir R. Ghorpade, Trygve Johnsen, Rati Ludhani et al.
We determine all the Betti numbers of the $q$-ary second order Reed-Muller codes of length $q^2$, and also of the elongations of matroids associated to these codes. We then use it to determine the higher weight spectra of these codes. As a special case, we recover some results of Kaplan and Matei about counting certain curves over finite fields with prescribed rational intersection points. In geometric terms, our results relate to the affine Veronesean by which we mean the image of the affine plane $\mathbb{A}^2$ under the quadratic Veronese embedding of $\mathbb{P}^2$ in $\mathbb{P}^5$. Indeed, finding the higher weight spectra, of the Reed-Muller code considered here, corresponds to determining the number of $\mathbb{F}_q$-rational points on all possible sections of this affine Veronesean by linear subvarieties of $\mathbb{P}^5$.