This work addressed mathematical games popular as the Tower of Hanoi and the game Nim, as well as the topics of number theory underlying such games, presenting mathematical arguments to explain how and why they work, thus allowing the student to play can apply the mathematical knowledge acquired . First, the games are presented, are then discussed the mathematical theory of numbers. And further is done the relationship between game and theory