Nonlinear interaction of a modulated beam with plasma