WOLFRAM|DEMONSTRATIONS PROJECT

Recursion in the Ackermann Function

​
m
n
show labels
include indirect calls
The Ackermann function is a classic example of a function that is not "primitive recursive"—its evaluation cannot be "unwound" into simple loops. See how instances of the Ackermann function get evaluated by calling on others. The Ackermann function grows very rapidly. As its first argument increases, it effectively goes from addition, to multiplication, powers, power towers, etc.