Fixed tail recursion in problem 1

Actually problem 1 did not calculate tail recursive. Fixed.