Script for analyzing factors found for
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


'Mersenne' - Ruby script for analyzing factors found for

The initial purpose of this script was to analyze factors that I found using 
mprime, a tool from to aid in the Great Internet Mersenne Prime 
Search, or GIMPS.  Although the primary purpose of the GIMPS project is to 
find values of p for which   2^p - 1   is prime, the Lucas-Lehmer (LL) test to 
determine primality is computationally expensive.  At least two primality 
tests must be performed: the project needs matching outputs before the result 
is considered to be official, and if the first two tests do not match, another 
one much be performed.  One obvious way to avoid a primality test is to search 
for factors of the candidate numbers before running any LL tests.  Some people 
also enjoy finding factors for "small" known-composite Mersenne numbers.

This script currently requires a human to copy/paste entries from their results page.  The page presents the data in a table, and the 
data file for this program is a tab separated file, similar to a CSV file. 

At present, the capabilities of this script:
 * Find the bit size and k-value for each factor.
   (All factors of Mersenne numbers can be written as: 2kp+1)
 * Present the data in a semi-pretty format.

In the future, what will it do?  Time will tell.  Feel free to offer ideas!


Although this script does not sort the factors based on how they were found, 
it seems relevant to mention that there are three ways to find a factor for 
the GIMPS project:

1. Trial factoring
    Essentially brute force for a given bit level (i.e., between 2^67 and 2^68)

2. P-1 factoring
    Searches for "smooth" factors below given bounds
    A factor's "smoothness" is determined by the prime factorization of k

3. ECM factoring
    Uses elliptic curves to find factors for small Mersenne numbers
    This is the probabilistic method of the three: the rest are deterministic

For more information about the mathematics behind this stuff, see: