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.

Showing 1-3 of 3 results.

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.

Original entry on oeis.org

3, 33, 315, 3143, 31417, 314160, 3141593, 31415927, 314159266, 3141592655, 31415926537, 314159265359, 3141592653591
Offset: 0

Views

Author

Gerald McGarvey, Sep 19 2004

Keywords

Comments

-0.75 + 0*i is the neck of the Mandelbrot set.
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.
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
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
Terms through a(9) verified in MAGMA by Jason Kimberley, and in Mathematica by Hans Havermann.
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

References

  • Peitgen, Juergens and Saupe: Chaos and Fractals (Springer-Verlag 1992) pages 859-862.
  • Peitgen, Juergens and Saupe: Fractals for the Classroom (Springer-Verlag 1992) Part two, pages 431-434.

Crossrefs

Programs

  • 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
    
  • Maple
    Digits:=2^8:
    f:=proc(z, c, k) option remember;
      f(z, c, k-1)^2+c;
    end;
    a:=proc(n)
    local epsilon, c, k;
      epsilon:=10.^(-n):
      c:=-0.75+epsilon*I:
      f(0, c, 0):=0:
      for k do
        if abs(f(0, c, k))>2 then
          break;
        fi;
      od:
      return(k);
    end;
    seq(a(n), n=0..7); # Martin Renner, Feb 24 2018
  • Mathematica
    $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 *)
  • 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

Extensions

Links corrected by Gerald McGarvey, Dec 16 2009
Corrected and extended by Robert Munafo, Jan 25 2010
Name corrected by Martin Renner, Feb 24 2018

A300078 Number of steps of iterating 0 under z^2 + c before escaping, i.e., abs(z^2 + c) > 2, with c = -5/4 - epsilon^2 + epsilon*i, where epsilon = 10^(-n) and i^2 = -1.

Original entry on oeis.org

1, 18, 159, 1586, 15731, 157085, 1570800, 15707976
Offset: 0

Views

Author

Martin Renner, Feb 24 2018

Keywords

Comments

A relation between Pi and the Mandelbrot set: 2*a(n)*epsilon converges to Pi.
c = -5/4 - epsilon^2 + epsilon*i is a parabolic route into the point c = -5/4, the second neck of the Mandelbrot set.
The difference between the terms of a(n) and A300077(n) = floor(1/2*Pi*10^n) is d(n) = 0, 3, 2, 16, 24, 6, 4, 13, ...

Crossrefs

Programs

  • Maple
    Digits:=2^8:
    f:=proc(z, c, k) option remember;
      f(z, c, k-1)^2+c;
    end;
    a:=proc(n)
    local epsilon, c, k;
      epsilon:=10.^(-n):
      c:=-1.25-epsilon^2+epsilon*I:
      f(0, c, 0):=0:
      for k do
        if abs(f(0, c, k))>2 then
          break;
        fi;
      od:
      return(k);
    end;
    seq(a(n), n=0..7);
  • Python
    from fractions import Fraction
    def A300078(n):
        zr, zc, c = Fraction(0,1), Fraction(0,1), 0
        cr, cc = Fraction(-5,4)-Fraction(1,10**(2*n)), Fraction(1,10**n)
        zr2, zc2 = zr**2, zc**2
        while zr2 + zc2 <= 4:
            zr, zc = zr2 - zc2 + cr, 2*zr*zc + cc
            zr2, zc2 = zr**2, zc**2
            c += 1
        return c # Chai Wah Wu, Mar 03 2018

A332062 Number of iterations of z -> z^2 + 1/4 + 1/2^n until z > 2, starting with z = 0.

Original entry on oeis.org

2, 3, 5, 7, 11, 16, 23, 34, 48, 69, 99, 140, 199, 282, 400, 567, 802, 1135, 1607, 2273, 3215, 4548, 6432, 9097, 12866, 18196, 25734, 36394, 51470, 72790, 102942, 145582, 205885, 291167, 411773, 582336, 823548, 1164673, 1647097, 2329348, 3294197, 4658698, 6588395
Offset: 0

Views

Author

M. F. Hasler, Feb 22 2020

Keywords

Comments

The iterated map is of the form of the maps f_c: z -> z^2 + c used to define the Mandelbrot set as those complex c for which the trajectory of 0 under f_c will never leave the ball of radius 2.
The largest real number in the Mandelbrot set is c = 1/4, with the trajectory of 0 going to 1/2 from the left.
The number of iterations N(epsilon) to reach z > 2 for c = 1/4 + epsilon is such that N(epsilon) ~ Pi/sqrt(epsilon), see the Numberphile video.

Crossrefs

Cf. A332061 (contains this as subsequence), A299415 (variant based on the same idea, with 1/10^n instead of 1/2^n).

Programs

  • PARI
    apply( {A332062(n)=A332061(2^n)}, [0..35]) \\ may take about a second
    
  • Python
    A332062 = lambda n: A332061(2**n) # Warning: may give incorrect result for default (double) precision for n > 40. - Giovanni Resta, Mar 08 2020

Formula

a(n) = A332061(2^n) ~ Pi*2^(n/2), asymptotically.

Extensions

More terms from Jinyuan Wang, Mar 08 2020
Showing 1-3 of 3 results.