Filamentation instability, which develops mainly due to plasma acceleration in dynamic pinches, is studied using the ideal MHD model in the linear approximation. For the cases of implosion of a Z pinch, expansion of an inverse Z pinch, implosion of a theta pinch and magnetic flux compression by an annular plasma liner, exact solutions describing the growth of the azimuthal perturbations in a cold plasma are found. For a theta pinch geometry the Rayleigh-Taylor mode of filamentation instability is shown to be the dominating mode, its effective growth rate for large wavenumbers being given by the known expression (gk)12/. For an annular Z pinch or liner the effective growth rate of the dominating mode differs from this expression by a factor smaller than unity. The concept of an effective growth rate is found to be inapplicable to the development of filamentation instabilities in the course of implosion of a solid Z pinch: in this case perturbations do not propagate with the plasma particles, they converge to the axis faster than the pinch itself.