Solving Project Euler in Erlang