Magnetoplasma modes of a two-dimensional electron gas with spatially periodic charge density