Programming and Mathematical Thinking:
A Gentle Introduction to Discrete Math Featuring Python
Concepts of discrete mathematics can help clarify a programmer's thinking about software design problems and can make many solutions obvious.
Starting at an elementary level, this book teaches about fundamental structures of discrete mathematics and many simple but powerful programming techniques using those structures.