recursion typically occurs in each recursive call when the larger problem is divided into smaller parts the larger data set is subdivided into smaller sets or the larger term is reduced to smaller value by each recursive call in our recursive printing solutionthis progression is accomplished by subtracting one from the current value of in each recursive function call factorials the factorial of positive integer can be used to calculate the number of permutations of elements the function is defined asnn ( ( with the special case of this problem can be solved easily using an iterative implementation that loops through the individual values [ nand computes product of those values but it can also be solved with recursive solution and provides simple example of recursion consider the factorial function on different integer values after careful inspection of these equationsit becomes obvious each of the successive equationsfor can be rewritten in terms of the previous equation ( ) ( ) ( ) ( ) ( )since the function is defined in terms of itself and contains base casea recursive definition can be produced for the factorial function as shown here listing provides recursive implementation of the factorial function if nn ( )!if