First attempt at solving project euler problem 1.
Handle stack overflow.
Rewrite range using a nested function.