More recently, Permutation City by Greg Egan and Neverness by David Zindell are all about mathematical journeys in fictional worlds. It's hard to discuss what they mean without getting pretty deep into the philosophical implications of simulated worlds, though, so they're less useful as pen-and-paper exercises and more interesting as references on contemporary philosophy.
It's been a long time since I last read Permutation City and I was browsing its Wikipedia page to refresh my memory and I loved this description: "there is no difference, even in principle, between physics and mathematics".
As the Wikipedia page alludes, Egan, and this book in particular, was surely the inspiration for Tegmark's Mathematical Universe Hypothesis; the notion that all logically/mathematically consistent structures exist on some level, our universe among them.
(Though in truth the Pythagoreans of 2500 BC -- those adherents to what can rightly be called the first universalizing European religion -- believed much the same thing. Egan and the Pythagoreans, but not Tegmark, also considered the nature of time in such a scenario; eternal recurrence was a Pythagorean idea.)
Everything that you can imagine, no matter how trivial, is a consistent notion that can be expressed mathematically as a true logical proposition. This includes an empty room, a Platonic solid, physical entropy, whatever. As Wittgenstein once noted, "logically consistent statements which are a priori true are possibilities which ensure their own truth."
What stands in opposition to this? The logically nonsensical – the incomputable. This includes anything discrete that can't be simulated, even in principle. These things cannot exist even in an infinite mathematical universe; for everything in such a universe is emergent, but such things cannot emerge.
I just finished Permutation City for the first time since it’s come up on HN a few times so I thought I’d give it a read. (Mild spoiler alert) I found that once everything was in the autoverse I stopped caring about the characters’ copies. Maybe that’s an intended perspective, or maybe it says something about me.
Too bad they didn't release the following one, I wanted to read about Perec and Borges...