Skip to main content

A module for finding primes.

Project description

Find_primes

Find_primes is a library to find all kinds of primes.

Install

pip install find-primes

Twin Primes https://en.wikipedia.org/wiki/Twin_prime A twin prime is a prime number that is either 2 less or 2 more than another prime number. Example: Find all twin primes below 1000.

from find_primes import find_twins
print(find_twins(1000))

Palindrome Primes https://en.wikipedia.org/wiki/Palindromic_prime A palindrome prime is a prime number that is also a palindrome number. Example: Find all palindrome primes below 1000.

from find_primes import find_palindromes
print(find_palindromes(1000))

Emirp https://en.wikipedia.org/wiki/Emirp An emirp is a prime number that results in a different prime when its decimal digits are reversed. Example: Find all emirps below 1000.

from find_primes import find_reverse
print(find_reverse(1000))

Primes in Arithmetic Progression https://en.wikipedia.org/wiki/Primes_in_arithmetic_progression Primes in arithmetic progression are any sequence of at least three prime numbers that are consecutive terms in an arithmetic progression. Example: Find all primes in arithmetic progression below 1000.

from find_primes import find_arithmetic_prime_progressions
print(find_arithmetic_prime_progressions(1000))

Mersenne Prime https://en.wikipedia.org/wiki/Mersenne_prime A mersenne prime is a prime number that is one less than a power of two. Example: Find all mersenne primes below 600000.

from find_primes import find_mersenne_primes
print(find_mersenne_primes(600000))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

find_primes-1.1.1.post1.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

find_primes-1.1.1.post1-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page