amount of dataleading to stack overflow recursion is usually used because it simplifies problem conceptuallynot because it' inherently more efficient mathematical induction recursion is the programming equivalent of mathematical induction mathematical induction is way of defining something in terms of itself (the term is also used to describe related approach to proving theorems using inductionwe could define the triangular numbers mathematically by saying if tri(nn tri( - if defining something in terms of itself may seem circularbut in fact it' perfectly valid (provided there' base casefactorials factorials are similar in concept to triangular numbersexcept that multiplication is used instead of addition the triangular number corresponding to is found by adding to the triangular number of - while the factorial of is found by multiplying by the factorial of - that isthe fifth triangular number is + + + + while the factorial of is * * * * which equals table shows the factorials of the first numbers table factorials number calculation factorial by definition * * * * , , ,