[*Cryptonomicon*][1] is a book by Neal Stephenson. One of the main characters in the WWII timeline is Lawrence Waterhouse, a mathematician and cryptologist. Waterhouse gets to interact with Alan Turing. 

Neal Stephenson later wrote a series (the Baroque cycle, starting with [*Quicksilver*][2]) which featured ancestors of the characters in Cryptonomicon. The Waterhouse in *Quicksilver* works with Isaac Newton and encounters Leibniz, but is not a mathematician.

(I don't think either of these works is as good as Stephenson's *Snow Crash,* but that doesn't feature mathematicians.)


  [1]: http://en.wikipedia.org/wiki/Cryptonomicon
  [2]: http://en.wikipedia.org/wiki/Quicksilver_(novel)