Let p be a prime, and λ be a nonzero element of the finite field F pm . The λ-constacyclic codes of length p s over F pm are linearly ordered under set-theoretic inclusion, i.e., they are the ideals 〈(x - λ 0 ) i 〉, 0 ≤ i ≤ p s of the chain ring [(F pm [x])/((x ps - λ))]. This structure is used to establish the symbol-pair distances of all such λ-constacyclic codes. Among others, all maximum distance separable symbol-pair constacyclic codes of length ps are obtained.
Let $\mathbb{F}_{p^m}$ be a finite field of cardinality $p^m$ and $R = \mathbb{F}_{p^m}[u]/\langle u^2\rangle = \mathbb{F}_{p^m}+u\mathbb{F}_{p^m}$ $(u^2 = 0)$, where $p$ is a prime and $m$ is a positive integer. For any $λ∈ \mathbb{F}_{p^m}^{×}$, an explicit representation for all distinct $λ$-constacyclic codes over $R$ of length $np^s$ is given by a canonical form decomposition for each code, where $s$ and $n$ are arbitrary positive integers satisfying ${\rm gcd}(p,n) = 1$. For any such code, using its canonical form decomposition the representation for the dual code of the code is provided. Moreover, representations for all distinct cyclic codes, negacyclic codes and their dual codes of length $np^s$ over $R$ are obtained, and self-duality for these codes are determined. Finally, all distinct self-dual negacyclic codes over $\mathbb{F}_5+u\mathbb{F}_5$ of length $2· 3^t· 5^s$ are listed for any positive integer $t$.