A planetary system 200 light-years away has been found locked in a rare orbital dance. Of the six exoplanets orbiting a star named TOI-178, the five outermost follow rhythmic orbital periods, with each linked to the planets on either side.

Such a dance is called a chain of resonance, and it's only rarely seen. But it can reveal something about how planetary systems form.

Orbital resonances aren't uncommon. Basically, they mean that the orbital periods of two bodies can be described as a ratio.

A few examples can be found in the Solar System. There's Pluto and Neptune - for every two orbits of Pluto around the Sun, Neptune goes around thrice; that's a 2:3 resonance. And three moons of Jupiter are in a resonance chain. For every one orbit of Ganymede, Europa goes around twice and Io four times; that's a 1:2:4 resonance.

But the five outer exoplanets of the TOI-178 system have one of the most complex resonance chains ever seen - 3:4:6:9:18 (where the innermost exoplanet in the chain is completing 18 orbits for every three orbits of the outermost).

This complexity, according to a team of researchers led by Adrien Leleu from the Université de Genève and the University of Bern in Switzerland, is a clue to the system's 7-billion-year history.

"The orbits in this system are very well ordered, which tells us that this system has evolved quite gently since its birth," said astronomer Yann Alibert of the University of Bern.

The TOI-178 system is not the only such with a complex chain of resonance. Last year, astronomers announced the discovery of a six-exoplanet system, the HD 158259 system, in a near-perfect resonance chain, with each pair of planets close to a 2:3 resonance.

The Kepler-80 system has five exoplanets in a resonance chain of 4:6:9:12:18. And the famous TRAPPIST-1 system has a seven-exoplanet resonance chain of 2:3:4:6:9:15:24.

The TOI-178 system is different, though. Because the arrangement of the exoplanets in the system is a higgledy-piggledy mess that doesn't seem to make a lick of sense.

Here in the Solar System, for instance, the planets are all neatly grouped, with the denser rocky worlds on the inside, the fluffy gas giants in the middle, and the ice giants on the outside. And HD 158259 has one rocky super-Earth on the inside, and the five outer exoplanets are mini Neptunes. TRAPPIST-1's exoplanets are all similar sizes and densities.

Compare and contrast with TOI-178:

"It appears there is a planet as dense as the Earth right next to a very fluffy planet with half the density of Neptune, followed by a planet with the density of Neptune," explained astronomer Nathan Hara of the Université de Genève. "It is not what we are used to."

Moreover, it does not jibe at all with our understanding of resonant systems, or with our understanding of how planetary systems form.

"This is not what we expected, and is the first time that we observe such a setup in a planetary system," Leleu said. "In the few systems we know where the planets orbit in this resonant rhythm, the densities of the planets gradually decrease as we move away from the star, and it is also what we expect from theory."

It is unclear what, exactly, gives, but the discovery certainly highlights a gap in our knowledge. The harmonious orbits suggest that the system has not been significantly disturbed since formation, since the exoplanets have had time to settle into a strong resonance as they exert a cumulative gravitational effect on each other.

Such complexity is delicate; any disruptive influence on the system could easily render the orbits chaotic. That's difficult to resolve with the apparent disorder of the planets themselves. Working with models and simulations could help figure out how such a system is possible.

Meanwhile, the team believes there could be even more exoplanets farther out in the system, also linked in the resonance chain. By calculating the likely resonance, astronomers could work out where these exoplanets should be in relation to the others, and look for them. This, too, could render some clues.

The system is so peculiar that the team believes it could become one of the "Rosetta stone" systems for studying planet formation and evolution.

"We might find more planets that could be in the habitable zone - where liquid water might be present on the surface of a planet - which begins outside of the orbits of the planets that we discovered to date," Leleu said.

"We also want to find out what happened to the innermost planet that is not in resonance with the others. We suspect that it broke out of resonance due to tidal forces."

The research is due to appear in Astronomy & Astrophysics, and is available on arXiv.