Here is the book I'm referring to
Secrets of mental math : the mathemagician's guide to lightning calculation and amazing math tricks / Arthur Benjamin and Michael Shermer