ulam_spiral


ulam_spiral, an Octave code which displays the integers as a spiral of grid cells, with the primes highlighted, so show that they tend to fall along diagonals, as discovered by Stanislaw Ulam.

Licensing:

The computer code and data files described and made available on this web page are distributed under the MIT license

Languages:

ulam_spiral is available in a MATLAB version and an Octave version.

Related Data and Programs:

ulam_spiral_test

caustic, an Octave code which generates an image of a caustic, by drawing n equally spaced points in a circle, and then connecting specific pairs of points using a spacing parameter m.

chladni_figures, an Octave code which creates Chladni figures of the eigenmodes of a thin vibrating plate, by Martin Gander and Felix Kwok.

epicycloid, an Octave code which plots an epicycloid curve.

fern, an Octave code which displays the Barnsley fractal fern.

fibonacci_spiral, an Octave code which displays points on a Fibonacci spiral, suggesting the arrangement of seeds in a sunflower, for instance.

hilbert_curve, an Octave code which computes the sequence of discrete Hilbert curves whose limit is a space-filling curve.

julia_set, an Octave code which computes and plots a Julia set, the set of points in the complex plane that remain bounded under a mapping of the form f(z) = z^2+c.

lissajous, an Octave code which plots a Lissajous figure.

mandelbrot, an Octave code which generates an ASCII PPM image of the Mandelbrot set;

mandelbrot_orbit, an Octave code which generates the sequence of Mandelbrot iterates arising from a single starting point.

Reference:

  1. Martin Gardner,
    Mathematical Games: The Remarkable Lore of the Prime Number,
    Scientific American,
    Volume 210, March 1964, pages 120-128.
  2. Martin Gardner,
    Sixth Book of Mathematical Diversion from Scientific American,
    ISBN13: 978-0-226-28250-3,
    University of Chicago Press, 1971.
  3. Christian Hill,
    The Ulam Spiral,
    https://scipython.com/blog/the-ulam-spiral/
  4. Cleve Moler,
    primespiral.m,
    Numerical Computing with MATLAB,
    SIAM, 2004,
    ISBN13: 978-0-898716-60-3,
    LC: QA297.M625,
    ebook: https://www.mathworks.com/moler/chapters.html

Source Code:


Last modified on 29 December 2022.