Analytic model of phononic crystals with local resonances