Linear codes with few weights over
Fp+uFpThis paper constructs linear codes over the ring $\mathbb{F}_p+u\mathbb{F}_p$ using the trace function on the extension ring $\mathbb{F}_q+u\mathbb{F}_q$ (with $q=p^m$ and $p$ an odd prime). The central contribution is the determination of the Hamming weight distributions of these codes, which is achieved by leveraging the symplectic-weight distributions of their Gray images. The resulting codes have few weights, and their weight distributions are fully characterized through this connection, without relying on additional assumptions or experimental validation.