User blog comment:King2218/Repeat/@comment-25418284-20140316193543

This is an unnecessarily confusing notation. Let me rewrite it.


 * K(0, (l, m), n) = ((l, m), n)
 * K(n, (l, m), 1) = (l, m)
 * K(m, (k, l), n) = K(m - 1, K(m, (k, l), n - 1), G((k, l)))

where G is recursively defined as:


 * G(a) = a when a is an integer
 * G((a, b)) = O(G(a), G(b))