programminga general overview clearlyn is larger than pk soby assumptionn is not prime howevernone of pk divides exactlybecause there will always be remainder of this is contradictionbecause every number is either prime or product of primes hencethe original assumptionthat pk is the largest primeis falsewhich implies that the theorem is true brief introduction to recursion most mathematical functions that we are familiar with are described by simple formula for instancewe can convert temperatures from fahrenheit to celsius by applying the formula ( )/ given this formulait is trivial to write +functionwith declarations and braces removedthe one-line formula translates to one line of +mathematical functions are sometimes defined in less standard form as an examplewe can define function fvalid on nonnegative integersthat satisfies ( and ( ( from this definition we see that ( ( ( and ( function that is defined in terms of itself is called recursive +allows functions to be recursive it is important to remember that what +provides is merely an attempt to follow the recursive spirit not all mathematically recursive functions are efficiently (or correctlyimplemented by ++' simulation of recursion the idea is that the recursive function ought to be expressible in only few linesjust like nonrecursive function figure shows the recursive implementation of lines and handle what is known as the base casethat isthe value for which the function is directly known without resorting to recursion just as declaring ( ( is meaninglessmathematicallywithout including the fact that ( the recursive +function doesn' make sense without base case line makes the recursive call int fint ifx = return else return fx xfigure recursive function using recursion for numerical calculations is usually bad idea we have done so to illustrate the basic points