This video from TED demonstrates how well some people can do math in their head. It is really worth watching and is truly frighting!
That said, if you watch you will realize what he is doing just further illustrates that many patterns exist in and between numbers. Number theory is quite a remarkable subject! And some people are just really clever at coming up with some interesting algorithms.