Most stars are pretty set in their ways. They are what they are, and they act like it - even if what they are is something really odd. But an object called Terzan 5 CX1 acts like one thing, and then something else entirely.

In 2003, it looked exactly like a binary system consisting of a neutron star accreting matter off a Sun-like companion - what is known as a low-mass X-ray binary.

But then, from 2009 to 2014, it dimmed down to resemble a millisecond pulsar, a type of star that flashes bright radio waves in millisecond pulses as the star rotates.

Then, in 2016, the object's profile went back to that of a low-mass X-ray binary.

So what the heck gives? Well, that's not entirely clear. But there is a way to find out - and if it is what it seems to be, Terzan 5 CX1 could be a rare glimpse of a fascinating stage in the lifespan of old, dead stars.

Terzan 5 CX1 is around 19,000 light-years away, in a globular cluster of stars called Terzan 5, in the constellation of Sagittarius (although Gemini would be more appropriate). It was first observed by the Chandra X-ray observatory in 2003, at which time the object was flaring brightly in X-rays.

This is consistent with a low-mass X-ray binary system, consisting of a neutron star and a Sun-like main-sequence star locked in mutual orbit. As the two whirl around in their dance of death, material from the main-sequence star is slurped onto the neutron star; this accretion process spews out X-ray radiation.

But when Chandra swung around again, taking observations between 2009 and 2014, the system was suddenly 10 times dimmer in X-rays.

In fact, its X-ray and radio profile was now consistent with a millisecond pulsar, a type of highly magnetised, rapidly rotating neutron star that blasts radio radiation from its poles. As it wobbles in its rotation, those radiation beams flash Earth like a cosmic lighthouse.

The millisecond pulses weren't actually detected, but astronomers analysing data from the Very Large Array did identify a radio counterpart to the object during this time. Then, in 2016, when Chandra took another look, Terzan 5 CX1 was up to its old X-ray tricks.

Since it's thought that the evolution from a low-mass X-ray binary to a millisecond pulsar should take thousands of years, it sounds like a pretty weird thing for a star to be doing. But believe it or not, there is precedent.

There have been just three other stars identified behaving the same way - rapidly switching between low-mass X-ray binary and millisecond pulsar profiles.

Those three stars are PSR J1023+0038, IGR J18245–2452 and XSS J12270–4859, and they're collectively known as transitional millisecond pulsars. All three have demonstrated transitions between a low-level accretion state and a millisecond pulsar state, and the millisecond pulses aren't always detected.

It's thought that this odd switching behaviour is related to the stars' age. As pulsars grow older, they lose angular momentum; after all, these are "dead" stars no longer fusing nuclei, so they are gradually losing heat and slowing down.

But when they're in a binary system, they can intermittently slurp matter from their companion star. This heats the pulsar back up again, restoring its angular momentum - giving its rotation a kick back into higher gear.

And study of another system in Terzan 5 could shed some light on this process. IGR J17480-2446 is a low-mass X-ray binary whose cooling has been observed following an accretion outburst in 2010. Interestingly, the star's crust was still cooling 5.5 years after the outburst - a much slower rate than other intermittently accreting neutron stars.

The reason for this could be an unusually strong magnetic field; or perhaps this object is younger than the other pulsars. The researchers recommend revisiting the strange star to provide more information to help understand the star's crust.

And the team that studied Terzan 5 CX1 recommends poring over radio data that may have included the star, in the hopes of finding those millisecond pulses.

In turn, those data could help us to understand how stars die.

The research on IGR J17480-2446 will appear in the Monthly Notices of the Royal Astronomical Society, and is available on arXiv.