Carl Sagan's novel _Contact_ is mostly about communications with extraterrestrials. But a far more interesting subplot is about a very different sort of communication. The aliens point out to mankind that if you calculate pi in base eleven, near the beginning there's a square number of consecutive digits that are all 0 or 1, and when plotted as a square they give a picture of a circle. A little further into the number there are reams of meaningful binary data. Before you complain hat nobody has write access to pi, note that there's no claim that pi ever *changed* value. Has anyone actually made a search in various bases that would find such things? Of course they might be in 2*pi or 1/pi or even (pi^2)/6. This subplot was left out of the movie, unfortunately. I can think of lots of interesting math short stories. Most interesting to me are "Luminous" and its sequel "Dark Integers" by Greg Egan. The profoundly anti-Platonic premise of these stories is that no mathematical theorem is true or false until it makes a difference to some physical system. (In some cases, that system may be the brain of a mathematician.) Fermat's Last Theorem may have been neither true nor false until Wiles proved it. This sounds unfalsifiable until a character points out that information can't travel faster than light, so if a theorem is proven true in one place it can still be proven false in another if no signal could have reached the latter from the former. This is by analogy with the mainstream physics idea that the values of the fundamental physical constants may be different in different places, with defects in space-time between these incompatible regions. So there could be inconsistencies is math, locked in since the first few nanoseconds after the Big Bang. The characters carry out a multi-year distributed search for inconsistencies is math, something like SETI@Home only even more controversial. They find some. And when they explore the boundary, they find they can move it by repeatedly proving "nearby" theorems on one side or the other of the border. All this is backstory. As the story starts, one of our two protagonists has been caught by bad guys who want to know where the defects are so they can move them to make lots of money. The bad guys don't care that the side effects of such tampering could be catastrophic. The story becomes like a James Bond movie in that the bad guys are using very advanced technology to try to extract the hidden information, but the good guy is using even more advanced technology to protect it, plus there's plenty of one-on-one violence, though nobody is actually killed. The good guys decide the only way to keep math safe is to destroy the alternate math. To do this they rent time on a Chinese supercomputer that's more powerful than all other computers in the world put together. This destruction goes well at first, but soon it starts to push back, as if someone was using an even more powerful computer to oppose their efforts. But who, and where? I can't say more -- or anything at all about the sequel -- without spoiling the story. For humorous math fiction, I recommend the old collections, _Fantasia Mathematica_ and _The Mathematical Magpie_, both edited by Clifton Fadiman. They contain math-related short stories, cartoons, poems, etc., including fiction by Martin Gardner.