The complete recursive formula is: This is the Euclidean algorithm, invented around BCE. It is one of the oldest algorithms still used today.
Notice how each call swaps the arguments: becomes , and becomes . This is your first recursion with two changing parameters. Each recursive call brings you closer to the base case.