cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A097486 A relationship between Pi and the Mandelbrot set. a(n) = number of iterations of z^2 + c that c-values -0.75 + x*i go through before escaping, where x = 10^(-n). Lim_{n->inf} a(n) * x = Pi.

This page as a plain text file.
%I A097486 #39 Aug 25 2025 02:11:41
%S A097486 3,33,315,3143,31417,314160,3141593,31415927,314159266,3141592655,
%T A097486 31415926537,314159265359,3141592653591
%N A097486 A relationship between Pi and the Mandelbrot set. a(n) = number of iterations of z^2 + c that c-values -0.75 + x*i go through before escaping, where x = 10^(-n). Lim_{n->inf} a(n) * x = Pi.
%C A097486 -0.75 + 0*i is the neck of the Mandelbrot set.
%C A097486 a(n) is an approximation to Pi*10^n. If you substitute "1/K" in place of "0.1" in the algorithm, the resulting sequence will approximate Pi*K^n. If expressed in base K, the sequence terms will then have digits similar to the digits of Pi in base K.
%C A097486 Calculation of this sequence is subject to roundoff errors. In PARI/GP and in C++ using a quad-precision library, the value of A(7) is 31415927, not 31415928 as was originally recorded in this entry. - _Robert Munafo_, Jan 07 2010
%C A097486 In the PARI/GP program below, if you change "z=0" to "z=c" and "2.0" to "4.0", you get a similar sequence and in addition, A(-1)=0, which is "more aesthetically correct" given the notion that this sequence approximates Pi*10^n. However, such a modified program is NOT equivalent for positive N, it gives A097486(8)=314159267. - _Robert Munafo_, Jan 25 2010
%C A097486 Terms through a(9) verified in MAGMA by _Jason Kimberley_, and in Mathematica by _Hans Havermann_.
%C A097486 The difference between the terms of a(n) and A011545(n) = floor(Pi*10^n) is d(n) = 0, 2, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 2, ... - _Martin Renner_, Feb 24 2018
%D A097486 Peitgen, Juergens and Saupe: Chaos and Fractals (Springer-Verlag 1992) pages 859-862.
%D A097486 Peitgen, Juergens and Saupe: Fractals for the Classroom (Springer-Verlag 1992) Part two, pages 431-434.
%H A097486 Dave Boll, <a href="https://web.archive.org/web/20140317091957/https://home.comcast.net/~davejanelle/mandel.html">Pi and the Mandelbrot set</a>.
%H A097486 Boris Gourevitch, <a href="http://www.pi314.net/fr/mandelbrot.php">Pi et les fractales, Ensemble de Mandelbrot - Dave Boll - Gerald Edgar</a>.
%H A097486 Hans Havermann, <a href="http://chesswanks.com/blahg/odo/Blog/Entries/2010/2/3_Computing_p_in_seahorse_valley.html">Computing pi in seahorse valley</a>. - _Hans Havermann_, Feb 12 2010
%H A097486 Aaron Klebanoff, <a href="https://web.archive.org/web/20140323095937/http://home.comcast.net/~davejanelle/mandel.pdf">Pi in the Mandelbrot set</a> (proof).
%H A097486 Robert Munafo, <a href="http://www.mrob.com/pub/muency/seahorsevalley.html#computepi">Seahorse Valley</a>. - _Robert Munafo_, Jan 25 2010
%p A097486 Digits:=2^8:
%p A097486 f:=proc(z, c, k) option remember;
%p A097486   f(z, c, k-1)^2+c;
%p A097486 end;
%p A097486 a:=proc(n)
%p A097486 local epsilon, c, k;
%p A097486   epsilon:=10.^(-n):
%p A097486   c:=-0.75+epsilon*I:
%p A097486   f(0, c, 0):=0:
%p A097486   for k do
%p A097486     if abs(f(0, c, k))>2 then
%p A097486       break;
%p A097486     fi;
%p A097486   od:
%p A097486   return(k);
%p A097486 end;
%p A097486 seq(a(n), n=0..7); # _Martin Renner_, Feb 24 2018
%t A097486 $MinPrecision = 128; Do[c = SetPrecision[.1^n * I - .75, 128]; z = 0; a = 0; While[Abs[z] < 2, z = z^2 + c; a++ ]; Print[a], {n, 0, 8}] (* _Hans Havermann_, Oct 20 2010 *)
%o A097486 (Magma) A097486:=function(n) c:=10^-n*Sqrt(-1)-3/4; z:=0; a:=0; while Modulus(z)lt 2 do z:=z^2+c; a+:=1; end while; return a; end function; // _Jason Kimberley_
%o A097486 (PARI) A097486(n)=local(a,c,z);c=0.1^n*I-0.75;z=0;a=0;while(abs(z)<2.0,{z=z^2+c;a=a+1});a \\ _Robert Munafo_, Jan 25 2010
%Y A097486 Cf. A011545, A299415, A300078.
%K A097486 nonn,more,changed
%O A097486 0,1
%A A097486 _Gerald McGarvey_, Sep 19 2004
%E A097486 Links corrected by _Gerald McGarvey_, Dec 16 2009
%E A097486 Corrected and extended by _Robert Munafo_, Jan 25 2010
%E A097486 Name corrected by _Martin Renner_, Feb 24 2018