a simple prime number generator in Erlang