  Resonant chains are groups of planets for which each pair is in resonance,
with an orbital period ratio locked at a rational value (2/1, 3/2, etc.). Such
chains naturally form as a result of convergent migration of the planets in the
proto-planetary disk. In this article, I present an analytical model of
resonant chains of any number of planets. Using this model, I show that a
system captured in a resonant chain can librate around several possible
equilibrium configurations. The probability of capture around each equilibrium
depends on how the chain formed, and especially on the order in which the
planets have been captured in the chain. Therefore, for an observed resonant
chain, knowing around which equilibrium the chain is librating allows for
constraints to be put on the formation and migration scenario of the system. I
apply this reasoning to the four planets orbiting Kepler-223 in a 3:4:6:8
resonant chain. I show that the system is observed around one of the six
equilibria predicted by the analytical model. Using N-body integrations, I show
that the most favorable scenario to reproduce the observed configuration is to
first capture the two intermediate planets, then the outermost, and finally the
innermost.
