# What Tetration Algorithm can I utilize

I am trying to write program, that builds fractal, like a mandelbrot, but somewhat special... I could explain my "thought flow":

A mandelbrot fractal (I call it "operation order 1") is done by iteratively calculating complex number $$Z(n+1) = Z(n)^2 + C$$, $$Z(0)=0$$, $$C$$ is zoomed and offset screen coordinate. After an infinite number of steps (supertask) we do determine, wherether series for a pixel - does series converge or diverge? and "how fast" does it diverges? Faster are colored by blue, slower - by white. For non-divergent $$C$$ pixels, belonging to Mandelbrot Set - are black:

Then, we may proceed to next order, in hyperoperation sequence, and produce "operation order 2" fractal, by iterated exponentiation $$Z(n+1)=c\exp(Zn)*C$$, basically resulting in this:

You may increase to the next, order 3 fractal, and get tetration fractal by doing Z(n+1)=cpow(ctet(some_const, Z(n)),C). But I virtually ran into a wall.. NO traces of how can I write ctet(base,height) function, for integer base, but complex height..

It's EASY to write for complex base and positive integer height: it's just equal to base^(base^(base^... and do it height times. But I need that not only for height being positive integers, but for height being complex argument. And base being.. $$2.0$$, or $$e$$, or whatever constant, that would just be convenient (that's of minor importance for the fractal structure, rather than bringing height variable to complex space)

That is called analytic continuation, or somehow similar. I am not interested in getting big numbers, but rather in iterating and detecting "Does it converge or diverge?", and, secondary "How many iterations does it take to diverge?"

Can you offer it in simple words, without going really heavy math?

Ive found this but I really fail to understand what is he doing, with insane symbols that aren't easily understandable by programmer on "how to convert that to code". and his taylor series has only X variable, but ctet(base,height) hyperoperation should take 2 arguments indeed..

• Tetration is hard to study for complex heights; very hard. We just recently proved there is a unique tetration for complex powers and real bases greater than $e^{1/e}$. You may be able to code something up without knowing the math, but I would try to learn some of it – Brevan Ellefsen Jun 29 at 4:25
• If base $b$ is real and $1 \lt b \lt \exp(\exp(-1)) \approx 1.44$ then you can define fractional and even complex heights meaningfully and with not too difficult pregramming with some appropriate software (for instance Pari/GP providing complex arithmetic with arbitrary precision, series etc). Keyword is here "Schroeder-function" (or "Koenigs-function"). I've provided a couple of examples for this in answers here in MSE and in MO. – Gottfried Helms Jul 6 at 9:11
• Perhaps this link helps/gives first tools to approximations of tetration see wikiwand.com/en/Super-logarithm – Gottfried Helms Jul 12 at 11:16
• Just out of curiosity: were you able to do some progress on this? – Gottfried Helms Oct 10 at 7:54

This is not an answer, just a comment, but having an image in it

Here is an example of complex heights. I've the base $$b=4$$, initial value $$z_0=4$$ . Then -in steps of 128- computations for heights $$h=1, \cdots, h=I , \cdots, h=-1 , \cdots, h=-I , \cdots, h=1$$ with $$h$$ on the complex unit circle. (The computations are done with a version of the Kneser-ansatz for bases $$b$$ larger than $$b=e=\exp(1)$$ (the choice in Kneser's original text) programmed by the tetration-forum member S. Levenstein). You might not yet have an idea how iteration with complex heights looks in a trajectory. Here is one picture.

You can see, that from $$z_k= \;^{\exp(2\pi I \cdot k/128)}4$$ with $$k=0$$ and $$z_0=4$$ the trajectory does roughly an egg-formed path via $$z_{64}=0$$ back to $$z_{128}=4=z_0$$.
I don't know whether such a trajectory would really be useful for your project-intentions... Is it anyway?

remark: I'd like more to use the notation $$\exp_{\log 4}^{\circ h_k} (z) \text{ with } h_k=\exp(2 \pi I \cdot k/128) \text{ and } z=1$$ but for whatever reason the public prefers the less expressive notation $$^h 4$$ .

remark 2: the legend of the image does not perfectly fit.
In the title it should be
"$$\small \exp(2*Pi*î*k/128)$$ for $$\small k=0..128$$"
and the x/y-legends should contain "z" instead of "x".
It's an older picture, just reused.

• Ofc, If we would manage to get the formula of ctet(z, x) to get complex z tetrated to complex x - that could produce an interesting and complicated fractal, that was never seen by human yet! I do think that's worth some prize! – xakepp35 Jul 13 at 13:33
• You may be somewhat close to it.. I am in need for algorithm not for ctet(4,x) but for arbitary z, and z is small.. – xakepp35 Jul 13 at 13:39
• I know, I just wanted to make sure that's really what you want... I thought it might be that that closed curve uncovers some otherwise hidden problems... The code for the computation is due to Sheldon Levenstein as given to the tetration-forum and written in Pari/GP. I have a much simpler idea how to compute this, but what gives at best approximations to some 5 to 10 decimal digits to SL's computations. It involves matrix-diagonalization and complex arithmetic (which is possible for instance in Pari/GP) – Gottfried Helms Jul 13 at 14:41
• To get it "in graphics" and fast, this operation would better be performed on the GPU, with means of OpenCL, or (even better for my particular "visualisation case") - in GLSL, right within the browser, even from android mobile phone. But I havent ever heard about pari/GP - its not a common and known language, as C/C++/GLSL may be to an average programmer and matematician. How can we similarly run that program and get such an 2D colored image (preferably, with hardware acceleration)? – xakepp35 Jul 15 at 15:53
• Pari/GP can be used as a nice interpreter language in style of C and "for nerds" also can be used in *.dll-mode, its functions being called by your surrounding main-C-program. The internal plotting-possibilities are not much developed, I think it calls Gnu-plot as subroutines or external program for plotting. You can get it at pari.math.u-bordeaux.fr it is still under very active development. If you have multiprecision and complex-number routines you should be able to re-engineer the tetration-functionality in your program anyway. I use Pari/GP because it makes it easy to explore math. – Gottfried Helms Jul 16 at 7:27