Tervan Andrisn is one of a group of math savants who get on the bad side of the Galactic Emperor. He had no idea that eloping with an Imperial Princess - at her suggestion - could get him and his friends exiled.
It turns out to be a big mistake on the part of the Emperor! Using their math skills, the kids develop a way to escape from the prison planet and return to topple the Imperial throne. The exiles who accompany them from exile set up a new government.
Unfortunately, another military coup was already underway before their return and their freedom is short-lived. They find themselves exiled once again. This time, however, escaping is easier and they plan how to use their new technology to benefit the galaxy.