Recursive factorial and test