  We present a series of dynamical maps for fictitious 3-planets systems in
initially circular coplanar orbits. These maps have unveiled a rich resonant
structure involving two or three planets, as well as indicating possible
migration routes from secular to double resonances or pure 3-planet
commensurabilities. These structures are then compared to the present-day
orbital architecture of observed resonant chains. In a second part of the paper
we describe N-body simulations of type-I migration. Depending on the orbital
decay timescale, we show that 3-planet systems may be trapped in different
combinations of independent commensurabilities: (i) double resonances, (ii)
intersection between a 2-planet and a first-order 3-planet resonance, and (iii)
simultaneous libration in two first-order 3-planet resonances. These latter
outcomes are found for slow migrations, while double resonances are almost
always the final outcome in high-density disks. Finally, we discuss an
application to the TRAPPIST-1 system. We find that, for low migration rates and
planetary masses of the order of the estimated values, most 3-planet
sub-systems are able to reach the observed double resonances after following
evolutionary routes defined by pure 3-planet resonances. The final orbital
configuration shows resonance offsets comparable with present-day values
without the need of tidal dissipation. For the 8/5 resonance proposed to
dominate the dynamics of the two inner planets, we find little evidence of its
dynamical significance; instead, we propose that this relation between mean
motions could be a consequence of the interaction between a pure 3-planet
resonance and a 2-planet commensurability between planets c and d.
