]>
As you use Axiom, you will find that you will write many short functions function:one-line definition to codify sequences of operations that you often perform. In this section we write some simple one-line functions.
This is a simple recursive factorial function for positive integers.
This function computes .
This function computes a Mersenne number, several of which are prime. Mersenne number
If you type mersenne, Axiom shows you the function definition.
Generate a stream of Mersenne numbers.
Create a stream of those values of such that mersenne(i) is prime.
Finally, write a function that returns the -th Mersenne prime.