Are there any examples of science fiction in which math plays the central role? Before examining that question, let me pose a simpler one: is mathematics a branch of the sciences, like physics or astronomy?
The answer is "no." Although mathematics and, for instance, theoretical physics, appear at first glance to be very similar, they couldn't be more different. In theoretical physics, the goal is to construct some sort of framework to explain how the universe works. It's inherently inductive -- we work from observations about the universe to produce an explanation that fits all of the facts. While this might include long stretches of deductive mathematics, at the end of the day, the only thing that matters is whether the theory explains the observations.
Mathematicians operate in exactly the opposite direction. They begin with a set of basic postulates (or, more accurately, the huge set of mathematical results that have been deduced from these postulates over the centuries) and use logical deduction to come up with new results. In real life, things aren't quite as "clean" as I'm suggesting here -- I suspect that mathematicians often use hunches and gut instincts, just like theoretical physicists, to try to guess new results and jump far ahead of what's currently known. But then they have to backtrack and prove everything deductively, or it doesn't "count" as mathematics.
One of the science encyclopedias in our house when I was growing up described mathematics as the "queen and servant of science," and I think that's a pretty apt description. (A little intellectual dumpster diving on Google now reveals that this was actually the title of a 1951 popular mathematics book by Eric Temple Bell). What's really mysterious is why mathematics, which seems to be a game played by mathematicians, describes the physical universe so well. But I'll save that for a future post. On to science fiction!
Probably the most famous work of science fiction with a mathematical theme is "--And He Built a Crooked House--" by Robert Heinlein. In this story, an architect builds a house in the shape of an unfolded tesseract (a four-dimensional cube), but an earthquake causes it to fold up into a true four-dimensional tesseract, with predictably bizarre results. And of course, there's the much older Flatland. I also know of a couple of short story anthologies with mathematical themes: Mathenauts (1987), and the older Fantasia Mathematica (1958), which includes the Heinlein story.
But in general, science fiction stories based on mathematics are few and far between. (The existence of these special anthologies illustrates my point -- you'd never see an anthology about "physics in science fiction" or "astronomy in science fiction" -- that would include half the science fiction stories ever written!) There are many stories about mathematicians -- The Mind-Body Problem by Rebecca Goldstein is a classic example -- but those aren't science fiction.
I think that the nature of mathematics just doesn't lend itself very well to fictionalization. First, it's really hard to come up with speculative ideas in mathematics. Because math is deductive, it's more set in stone then anything in science. Once a mathematician proves something, it stays proved. So it's conceivable (though unlikely) that we might someday evade relativity and develop faster-than-light travel. But we're never going to discover that there are only a finite number of prime numbers, or that 2+2 = 5. Second, it's a lot harder to make mathematics both understandable and interesting to a non-expert reader. (Which is why I have tremendous respect for Martin Gardner). And if you can get around both of these problems, how do you apply a clever new idea in mathematics to people's lives to produce a story? It's just very, very difficult, and few writers have attempted it.