Quadratic residue codes over the ring $\mathbb{F}_{p}[u]/\langle u^m-u\rangle$ and their Gray images

Let $m\geq 2$ be any natural number and let $\mathcal{R}=\mathbb{F}_{p}+u\mathbb{F}_{p}+u^2\mathbb{F}_{p}+\cdots+u^{m-1}\mathbb{F}_{p}$ be a finite non-chain ring, where $u^m=u$ and $p$ is a prime congruent to $1$ modulo $(m-1)$. In this paper we study quadratic residue codes over the ring $\mathcal{R}$ and their extensions. A gray map from $\mathcal{R}$ to $\mathbb{F}_{p}^m$ is defined which preserves self duality of linear codes. As a consequence self dual, formally self dual and self orthogonal codes are constructed. To illustrate this several examples of self-dual, self orthogonal and formally self-dual codes are given. Among others a [9,3,6] linear code over $\mathbb{F}_{7}$ is constructed which is self-orthogonal as well as nearly MDS. The best known linear code with these parameters (ref. Magma) is not self orthogonal.