TITLE: How to compute a negative "Multibrot" set?
QUESTION [8 upvotes]: The Mandelbrot set is defined as follows: given the function f(z, c) = z2 + c, a number z in the complex plane is in the Mandelbrot set if and only if the sequence defined by z0 = z, zn+1 = f(zn, z0) is bounded.
There are numerous programs that draw images computed from such definitions, including my own "HTML 5 Fractal Playground", written by me.  My software runs in a web browser, and I will provide deep-links in my question to see the software draw various fractals that I refer to.  However, I do not guarantee that these links will work forever.
The Mandelbrot set can be graphed by clicking this link: http://danielsadventure.info/html5fractal/index.html#0,-2,2,-2,2,2,341,true,z%5E2%20%2B%20c,-2,2,-2,2.

My software, as well as every other fractal-graphing program that I know of, takes advantage of a particular fact about the generating equation: once the absolute value of any value in the sequence is known to have absolute value greater than 2, we immediately know that the sequence is unbounded (We say that the sequence "escapes").  If we compute many values in the sequence and don't see this happen, we assume that the number is in the Mandelbrot set.  We call 2 the "bailout number".
We know that the above rule works because once the absolute value of the sequence exceeds 2, the exponential part of the equation dominates.
The Mandelbrot set is generalized into any set that can be generated by an equation such as the function f given above.  One of the best-known generalizations are the "Multibrot" sets.  We simply replace the exponent 2 in f with some other number.  When the exponent is increased above 2, the same rule above about the absolute value of the sequence can still be used to generate graphs.  I refer to these Multibrot sets as M(n), where n is the exponent used in place of two, so for instance, M(2) is the original Mandelbrot set.
Here are a few more clickable graph links: M(3), M(8)


I wanted to compute negative Multibrot sets such as M(-2).  Here, my above method does not work.  Now, using the equation f(z, c) = z-2 + c, we cannot use the above method because if the value of the sequence becomes very large and c is small, the next value in the sequence will be small, then the next value large, and the sequence "bounces" back and forth between small and large.
A little bit of analysis reveals that any number z with absolute value greater than 2 is actually inside M(-2).  That's because the addition part of the equation overtakes the negative exponentiation, preventing the value from escaping.
That means that even the number 1,000,000 is in M(-2); the sequence simply "bounces" back and forth between very small and very large numbers.
The problem I have is that I frequently see images using the "bailout" method used to represent these sets and I know they are wrong.  Heck, my own software will draw such a figure, and I know it's wrong, yet my graph, known to be incorrect, looks similar to others that Google will find.

That was a long wall, but I wanted to show my own research before posing the question: given that I can't compute them the same way that I compute ordinary positive Multibrot sets, how can I compute negative Multibrot sets?
Edit in response to the answers and comments below.
The answers below indicate that I can draw a negative Multibrot fractal by using a completely different algorithm.  Rather than checking that the iterating function generates a sequence that "escapes", I can check that the sequence is periodic.  Interestingly, this provides variable values for coloring points inside the set, rather than outside the set, as the escape time algorithm does.
I have modified my program to use this algorithm and generated the following image for f(z,c) = z-2 + c:

The above image colors the set based on how many iterations were computed to detect periodicity.  However, it was also pointed out that a different plot may be drawn by using the detected period.

REPLY [6 votes]: https://commons.wikimedia.org/wiki/File:Multibrot_Lupanov_power-2_Q1.png suggests using the Lyapunov exponent as a stability criterion, before performing periodicity checking for colouring.
The Lyapunov exponent $\lambda$ is:
$$z_{k+1} = f(z_k) \\
\lambda = \lim_{n\to\infty} \frac{1}{n}\sum_{k=1}^n \log|f'(z_k)|$$
For $f(z) = z^p+c$, $f'(z) = p z^{p-1}$, and since an infinite limit is infeasible, I approximate with a large $m$ and $n$:
$$\lambda \approx \frac{1}{n}\sum_{k=m+1}^{m+n} \log|f'(z_k)|$$
The rationale is that if there is a periodic cycle, the contribution from the cycle will eventually dominate (the contribution of any finite number of iterations will tend to zero), so accelarate this domination by skipping the first $m$ iterations.
I tried plotting the Lyapunov exponent directly (yellow is negative, blue is positive):
$z \to z^{-2}+c$

$z \to z^{-3}+c$

It sort-of works for Julia sets too (but the iteration count should be coprime to the period, and it takes some fiddling to find the right range of Lyapunov exponents to visualize; see comments in the source code below):
$z \to z^{-2} -0.73 + 0.22i $

Here's the code I wrote using Fragmentarium as an OpenGL fragment shader host.
#include "Progressive2D.frag"
#include "Complex.frag"

#info Multibrot with Lyapunov Exponent

#group Multibrot

// best set the iteration count to twice a prime number
// this makes the different phases in a Julia set more likely to differ
uniform int  Iterations; slider[10,1994,5000]
// $ z \to z^{Power} + c $
uniform int Power; slider[-16,-2,16]

// render a Julia set instead of a Multibrot set
uniform bool Julia; checkbox[false]
// the $ c $ value for the Julia set
uniform vec2 JuliaC; slider[(-3,-3),(0,0),(3,3)]

// these need to be adjusted for Julia sets of negative powers
// first increase gain and edge so you can see something
// then adjust threshold until the colours are spread
// contrast adjustment
uniform float Gain; slider[-16.0,2.0,16.0]
// brightness adjustment
uniform float Threshold; slider[-4.0,0.0,1.0]
// edge colouring adjustment
uniform float Edge; slider[0.0,0.0,16.0]

// called for each pixel, see the GUI camera pane for viewing parameters
vec3 color(vec2 c) {

    // <http://math.stackexchange.com/a/1257937/209286> Mark McClure
    // critical point is $ 0 $ for positive Power, and $ 0^Power + c = c $
    // critical point is $ \infty $ for negative Power, and $ \infty^Power + c = c $
    // so start iterating from $ c $
    vec2 z = c;
    // Lyapunov exponent accumulator
    float le = 0.0;
    for (int i = 0; i < Iterations; ++i) {
            // $ zn1 \gets z^{Power - 1} $
            vec2 zn1 = vec2(1.0, 0.0);
            for (int j = 0; j < abs(Power - 1); ++j) {
                    zn1 = cMul(zn1, z);
            }
            if (Power < 0) {
                    zn1 = cInverse(zn1);
            }
            // $ dz \gets Power z^{Power - 1} $
            vec2 dz = float(Power) * zn1;
            // $ z \gets z^{Power} + c $
            z = cMul(zn1,z) + (Julia ? JuliaC : c);
            // allow orbit to settle before accumulating
            if (2 * i >= Iterations) {
                    // $ le \gets le + 2 log |dz| $
                    le += log(dot(dz, dz));
            }
    }
    // accumulated iterations/2 logs of squared magnitudes
    // so divide by 2 iterations/2 = iterations
    le /= float(Iterations);

    // colouring:
    // yellow below threshold
    // blue above threshold
    // white edges (resolution-dependent)
    le = pow(2.0, Gain) * (le - Threshold);
    float e = length(vec2(dFdx(le), dFdy(le)));
    e = clamp(Edge * e, 0.0, 1.0);
    le = clamp(le, -4.0, 4.0); // GLSL tanh() can fail outside this range
    le = tanh(le);
    return mix(clamp(vec3(0.5 - le, abs(le), 0.5 + le), 0.0, 1.0), vec3(1.0), e);
}