Erlang Version of Happy Number Generator

And here is an Erlang version of the Happy Number generator.