Tetration Forum

Full Version: Mathematica program for tetration based on the series with q-binomial coefficients
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
A Mathematica program to compute tetration for and  based on the formula with q-binomial coefficients from http://mathoverflow.net/q/259278/9550.

Increase Terms and/or WorkingPrecision option values to get more digits. Examples of values computed using this program are http://goo.gl/MLfEMC and http://goo.gl/LVRkk7.

Code:
ClearAll[Tetration];
Options[Tetration] = {Terms -> 40, WorkingPrecision -> 100};
Tetration[_, -1, OptionsPattern[]] = 0;
Tetration[a_, n_Integer /; n >= 0, OptionsPattern[]] := Power @@ Table[a, {n}];
Tetration[a_ /; 1 < a < E^(1/E), z_ /; Re[z] > -2, OptionsPattern[]] :=
  With[{q = -ProductLog[-Log[a]]},
  With[{limit = SequenceLimit[N[Accumulate[Table[Sum[(-1)^(n + k) q^Binomial[n - k, 2] QBinomial[z, n, q] QBinomial[n, k, q] Tetration[a, k], {k, 0, n}], {n, 0, OptionValue[Terms]}]], OptionValue[WorkingPrecision]]]},
   SetPrecision[limit, 3/4 Precision[limit]]]];
   
(* Examples:
   Tetration[Log[3], 1/2]
   Tetration[Log[3], 1/2, Terms -> 50, WorkingPrecision -> 150] *)