I came across this interesting project online. It’s called Project Euler, and the point is to use both mathematical skills and programming skills to solve the posted problems. You can use whatever language to solve, and you input the answer to validate it. So far I’ve worked on the very first one, and it’s pretty fun, both from a programming perspective, and from a math geek POV.
Here’s my solution to Problem 1:
Problem: Add all the natural numbers below one thousand that are multiples of 3 or 5.
Solution (Python):
reduce(lambda x,y: x+y, ifilter(lambda x: x%3==0 or x%5==0, range(1,1000)))
:)