  We present universal features of the topological invariant of p-wave
superconducting wires after the inclusion of spatial inhomogeneities. Three
classes of distributed potentials are studied, a single- impurity, a
commensurate and an incommensurate model using periodic site modulations. An
analytical polynomial description is achieved by splitting the topological
invariant into two parts, one dependent on the chemical potential and the other
not. For the homogeneous case, an elliptical region is found where the
topological invariant oscillates. The zeros of these oscillations occur at
points where the fermion parity switches for finite wires. The increase of
these oscillations with the inhomogeneity strength leads to new non-topological
phases. We characterize these new phases according to each class of spatial
distributions. Such phases could also be observed in the XY model.
