## Wednesday, July 18, 2012

### Add Multiply Exponentiate Tetrate

A random thought occurred to me today:
1. Multiplication is iterated addition.  `(= (* 5 4) (reduce + (take 4 (repeat 5))))`
2. Exponentiation is iterated multiplication.  `(= (expt 5 4) (reduce * (take 4 (repeat 5)))) ; if you've imported clojure.contrib.math/expt`
3. So what do you get if you iterate exponentiation?  Is it useful?
Another way to look at the question is: logarithms strength-reduce by one level, hence the log rules like `(= (+ (log a) (log b)) (log (* a b)))` and the definition of log as the inverse of exponentiation, just as division and subtraction invert multiplication and addition.  What, then, is the law for `(expt (log a) (log b))`?  Again, this should be the log of our mystery operation on a and b.

It turns out Wikipedia has me covered.  A tiny little section on the Exponentiation page links off to tetration, Ackermann function, and Knuth's up-arrow notation.  There goes my night.

(Bonus: I finally have all the background to understand the third panel of xkcd 207. #latetotheparty)