Novella based on Cube
The novella "Diamond Dogs" by science fiction writer Alastair Reynolds is at least partly inspired by Cube, in that it's an homage to the movie yet much, much more clever and sinister.
If you really enjoyed Cube, I recommend reading Diamond Dogs. Of course, Alastair Reynolds is well known for writing the Revelation Space books, and "Diamond Dogs" takes place in the Revelation Space universe.
I read it years ago, then re-read it earlier this year on an e-reader, pulling up some of the more obscure mathematical concepts so I could follow along with the puzzles the group was trying to solve. It's really good stuff, and great science fiction.