Euler Project with Erlang