By now, we have discovered hundreds of stars with multiple planets orbiting them scattered throughout the galaxy. Each one is unique, but a system orbiting the star HD 158259, 88 light-years away, is truly special.

The star itself is about the same mass and a little larger than the Sun - a minority in our exoplanet hunts. It's orbited by six planets: a super-Earth and five mini-Neptunes.

After monitoring it for seven years, astronomers have discovered that all six of those planets are orbiting HD 158259 in almost perfect orbital resonance. This discovery could help us to better understand the mechanisms of planetary system formation, and how they end up in the configurations we see.

Orbital resonance is when the orbits of two bodies around their parent body are closely linked, as the two orbiting bodies exert gravitational influence on each other. In the Solar System, it's pretty rare in planetary bodies; probably the best example is Pluto and Neptune.

These two bodies are in what is described as a 2:3 orbital resonance. For every two laps Pluto makes around the Sun, Neptune makes three. It's like bars of music being played simultaneously, but with different time signatures - two beats for the first, three for the second.

Orbital resonances have also been identified in exoplanets. But each planet orbiting HD 158259 is in an almost 3:2 resonance with the next planet out away from the star, also described as a period ratio of 1.5. That means for every three orbits each planet makes, the next one out completes two.

Using measurements taken using the SOPHIE spectrograph and the TESS exoplanet-hunting space telescope, an international team of researchers led by astronomer Nathan Hara of the University of Geneva in Switzerland were able to precisely calculate the orbits of each planet.

They're all very tight. Starting closest to the star - the super-Earth, revealed by TESS to be around twice the mass of Earth - the orbits are 2.17, 3.4, 5.2, 7.9, 12, and 17.4 days.

These produce period ratios of 1.57, 1.51, 1.53, 1.51, and 1.44 between each pair of planets. That's not quite perfect resonance - but it's close enough to classify HD 158259 as an extraordinary system.

And this, the researchers believe, is a sign that the planets orbiting the star did not form where they are now.

"Several compact systems with several planets in, or close to, resonances are known, such as TRAPPIST-1 or Kepler-80," explained astronomer Stephane Udry of the University of Geneva.

"Such systems are believed to form far from the star before migrating towards it. In this scenario, the resonances play a crucial part."

That's because these resonances are thought to result when planetary embryos in the protoplanetary disc grow and migrate inwards, away from the outer edge of the disc. This produces a chain of orbital resonance throughout the system.

Then, once the remaining gas of the disc dissipates, this can destabilise the orbital resonances - and this could be what we're seeing with HD 158259. And those tiny differences in the orbital resonances could tell us more about how this destabilisation is occurring.

"The current departure of the period ratios from 3:2 contains a wealth of information," Hara said.

"With these values on the one hand, and tidal effect models on the other hand, we could constrain the internal structure of the planets in a future study. In summary, the current state of the system gives us a window on its formation."

The research has been published in Astronomy & Astrophysics.