http://projecteuler.net/ - not so much as an application as a resource.
It has some really pithy math problems that can be either simple to solve or absolutely mind-screwingly hard.
All can be solved by a well designed program in a few seconds (regardless of language), or occasionally pen and paper. Usually each problem gives you an insight into into something (be it primes, handling large numbers, geometry or how to build a brick wall).
For example, problem 48 - What is the last 10 digits of 1^1 + 2^2 + 3^3 + ...1000^1000?
Easy to say, hard to calculate if you do it wrong.
Well recommended to keep that troublesome math genius in the programming class quiet!