A fast algorithm for recovering profiles of density and Lame parameters as functions of depth for the inverse seismic problem in an elastic medium is obtained. The medium is probed with planar impulsive P- and SV-waves at oblique incidence, and the medium velocity components are measured at the surface. The interconversion of P- and SV-waves defines reflection coefficients from which the medium parameter profiles are obtained recursively. The algorithm works on a layer-stripping principle, and it is specified in both differential and recursive forms. A physical interpretation of this procedure is given in terms of a lattice filter, where the first reflections of the downgoing waves in each layer yield the various reflection coefficients for that layer. A computer run of the algorithm on the synthetic impulsive plane-wave responses of a twenty-layer medium shows that the algorithm works satisfactorily.