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.

A299415 Number of steps of iterating z -> z^2 + c with c = 1/4 + 10^(-n) to reach z > 2, starting with z = 0.

Original entry on oeis.org

2, 8, 30, 97, 312, 991, 3140, 9933, 31414, 99344, 314157, 993457, 3141591, 9934586, 31415925, 99345881, 314159263, 993458825, 3141592652, 9934588264
Offset: 0

Views

Author

Martin Renner, Feb 21 2018

Keywords

Comments

A relation between Pi and the Mandelbrot set: a(n)*10(-n/2) converges to Pi.
c = 1/4 is the largest real number in the Mandelbrot set.
The difference between the terms of b(n) = floor(Pi*sqrt(10^n)) = 3, 9, 31, 99, 314, 993, 3141, 9934, 31415, 99345, 314159, 993458, ... and a(n) is d(n) = 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, ...

References

  • Heinz-Otto Peitgen; Hartmut Jürgens; Dietmar Saupe: Chaos. Bausteine der Ordnung. Berlin; Heidelberg: Springer, 1994, p. 452-456.

Crossrefs

Cf. A332061, A332062 (same with epsilon = 1/n resp. 1/2^n).

Programs

  • Maple
    Digits:=10^3:
    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.25+epsilon:
      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..11);
  • Mathematica
    digits = 10^3;
    f[z_, c_, k_] := f[z, c, k] = f[z, c, k-1]^2 + c;
    a[n_] := Module[{epsilon = 10^-n, c, k}, c = N[1/4 + epsilon, digits]; f[0, c, 0] = 0; For[k = 1, True, k++, If[Abs[f[0, c, k]] > 2, Break[]]]; k];
    a /@ Range[0, 11] (* Jean-François Alcover, Nov 05 2020, after Maple *)
  • PARI
    apply( {A299415(n)=A332061(10^n)}, [0..12]) \\ a(12) may take about a second to compute. -  M. F. Hasler, Feb 22 2020
    
  • Python
    A299415 = lambda n: A332061(10**n) # Warning: may give incorrect result for default (double) precision for n >= 12. -  M. F. Hasler, Feb 22 2020

Extensions

Edited and extended to a(14) by M. F. Hasler, Feb 22 2020
a(15)-a(19) from Bill McEachen, Aug 10 2025