where Z and C are complex numbers and C is constant, the mandelbrot set is the set of numbers Z0 for which Zn is bounded. that is, for any value n, including infinity, Zn is not infinite.

If you wish to calculate which points are part of the Mandelbrot set, it is reasonable to iterate a few hundred times and check if the absolute value of the current Z is more than some arbitrary number such as 2.

It is closely related to a julia set. the variable in a julia set is C, and Z0 is constant for any point on a julia set. If you take a point from a representation of the Mandelbrot set, you can create a Julia set for it by using its value of Z0 and plotting on the complex plane of C. There are programs that do this, such as the julia program in the Xscreensaver package.

Computer-generated representations of the Mandelbrot set are generally colorful, while the technical definition of the set allows for only two states: membership and non-membership. The colors typically come from either the number of iterations it takes for Zn exceed some value (indicating that the point is not a member) or the value of Zn with some arbitrary n. For example, if abs(Zn) is less than 2, assume it is a member and color it black. If it's between 2 and 3, color it red. 3-4, orange; 4-5, green; 5-6, blue; 6-100, indigo; 100-infinity, violet (numbers are pulled from the air and should not be taken as suggestions).