lucas_lehmer, a Python code which determines whether a Mersenne number 2^n-1 is prime by applying the Lucas-Lehmer test.
The information on this web page is distributed under the MIT license.
lucas_lehmer is available in a Python version.
Original Python version by John D Cook. This version by John Burkardt
John D Cook,
Searching for Mersenne primes,
https://www.johndcook.com/blog/2018/11/28/searching-for-mersenne-primes/
Posted 28 November 2018.
euclid, a Python code which investigates various versions of Euclid's algorithm for computing the greatest common divisor (GCD) of two integers.
is_prime, a Python code which implements various versions of the sieve of Eratosthenes to determine whether a given integer is prime.
polpak, a Python code which evaluates a variety of mathematical functions, polynomials, and sequences, including Bell, Benford, Bernoulli, Bernstein, Cardan, Catalan, Charlier, Chebyshev, Collatz, Delannoy, Euler, Fibonacci, Gegenbauer, Gudermannian, Harmonic, Hermite, Hofstadter, Jacobi, Krawtchouk, Laguerre, Lambert, Legendre, Lerch, Meixner, Mertens, Moebius, Motzkin, Phi, Stirling, Tau, Tribonacci, Zernike.
prime, a Python code which counts the number of primes between 1 and N, intended as a starting point for the creation of a parallel version.
prime_pi, a Python code which evaluates Pi(n), the number of primes less than or equal to an integer n.
prime_plot, a Python code which displays a plot of the prime and composite numbers.
ulam_spiral, a Python 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.