A pendulum theorem

We consider N linked pendulums which are inverted and balanced on top of one another, and establish a general theorem which shows how they may be stabilized by small vertical oscillations of the support.