added problem 4
support longer numbers
support longs
added tail recursive solution