This is the Ackermann algorithm!
I coded this all with help from Wikipedia. I did not create this algorithm, Wilhelm Ackermann did.