# PrimeGrid

PrimeGrid is a volunteer computing project that searches for very large (up to world-record size) prime numbers whilst also aiming to solve long-standing mathematical conjectures. It uses the Berkeley Open Infrastructure for Network Computing (BOINC) platform. PrimeGrid offers a number of subprojects for prime-number sieving and discovery. Some of these are available through the BOINC client, others through the PRPNet client. Some of the work is manual, i.e. it requires manually starting work units and uploading results. Different subprojects may run on different operating systems, and may have executables for CPUs, GPUs, or both; while running the Lucas–Lehmer–Riesel test, CPUs with Advanced Vector Extensions and Fused Multiply-Add instruction sets will yield the fastest results for non-GPU accelerated workloads.
PrimeGrid awards badges to users in recognition of achieving certain defined levels of credit for work done. The badges have no intrinsic value but are valued by many as a sign of achievement. The issuing of badges should also benefit PrimeGrid by evening out the participation in the less popular sub projects. The easiest of the badges can often be obtained in less than a day by a single computer, whereas the most challenging badges will require far more time and computing power.

## History

PrimeGrid started in June 2005 under the name Message@home and tried to decipher text fragments hashed with MD5. Message@home was a test to port the BOINC scheduler to Perl to obtain greater portability. After a while the project attempted the RSA factoring challenge trying to factor RSA-640. After RSA-640 was factored by an outside team in November 2005, the project moved on to RSA-768. With the chance to succeed too small, it discarded the RSA challenges, was renamed to PrimeGrid, and started generating a list of the first prime numbers. At 210,000,000,000 the primegen subproject was stopped.
In June 2006, dialog started with Riesel Sieve to bring their project to the BOINC community. PrimeGrid provided PerlBOINC support and Riesel Sieve was successful in implementing their sieve as well as a prime finding (LLR) application. With collaboration from Riesel Sieve, PrimeGrid was able to implement the LLR application in partnership with another prime finding project, Twin Prime Search (TPS). In November 2006, the TPS LLR application was officially released at PrimeGrid. Less than two months later, January 2007, the record twin was found by the original manual project. TPS has since been completed, and the search for Sophie Germain primes was suspended in 2024.
In the summer of 2007, the Cullen and Woodall prime searches were launched. In the Fall, more prime searches were added through partnerships with the Prime Sierpinski Problem and 3*2^n-1 Search projects. Additionally, two sieves were added: the Prime Sierpinski Problem combined sieve which includes supporting the Seventeen or Bust sieve and the combined Cullen/Woodall sieve. In the fall of the same year, PrimeGrid migrated its systems from PerlBOINC to standard BOINC software.
Since September 2008, PrimeGrid is also running a Proth prime sieving subproject.
In January 2010 the subproject Seventeen or Bust (for solving the Sierpinski problem) was added. The calculations for the Riesel problem followed in March 2010.

## Projects

As of January 2023, PrimeGrid is working on or has worked on the following projects:
| Project | Active sieve project? | Active LLR project? | Start | End | Best result |
| 321 Prime Search (primes of the form 3 × 2$^n$ ± 1) | No | Yes | 30 June 2008 | Ongoing | 3 × 2$^{18196595}$ − 1, largest prime found in the 321 Prime Search project |
| AP26 Search (Arithmetic progression of 26 primes) | — | — | 27 December 2008 | 12 April 2010 | 43142746595714191 + 23681770 × 23# × n, n = 0, ..., 25 (AP26) |
| AP27 Search (Arithmetic progression of 27 primes) | — | — | 20 September 2016 | Ongoing | 605185576317848261 + 155368778 × 23# × n, n = 0, ..., 26 (AP27) |
| Generalized Fermat Prime Search (active: n = 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304 inactive: n = 8192, 16384) | Yes (manual sieving) | — | January 2012 | Ongoing | 1963736$^{1048576}$ + 1, largest known Generalized Fermat prime |
| Cullen Prime Search | No | Yes | August 2007 | Ongoing | 6679881 × 2$^{6679881}$ + 1, largest known Cullen prime |
| Message7 | No | — | 12 June 2005 | August 2005 | PerlBOINC testing successful |
| Prime Sierpinski Problem | No | Yes | 10 July 2008 | Ongoing | 168451 × 2$^{19375200}$ + 1 |
| Extended Sierpinski Problem | No | Yes | 7 June 2014 | Ongoing | 202705 × 2$^{21320516}$ + 1, largest prime found in the Extended Sierpinski Problem |
| PrimeGen | No | — | March 2006 | February 2008 | — |
| Proth Prime Search | Yes | Yes | 29 February 2008 | Ongoing | 7 × 2$^{5775996}$ + 1 |
| Riesel Problem | No | Yes | March 2010 | Ongoing | 9221 × 2$^{11392194}$ − 1, |
| RSA-640 | No | — | August 2005 | November 2005 | — |
| RSA-768 | No | — | November 2005 | March 2006 | — |
| Seventeen or Bust | No | Yes | 31 January 2010 | Ongoing | 10223 × 2$^{31172165}$ + 1 |
| Sierpinski/Riesel Base 5 Problem | No | Yes | 14 June 2013 | Ongoing | 213988×5$^{4138363}$ − 1, largest prime found in the Sierpinski/Riesel Base 5 Problem |
| Sophie Germain Prime Search | No | No | 16 August 2009 | February 2024 | 2618163402417 × 2$^{1290000}$ − 1 (2p − 1 = 2618163402417 × 2$^{1290001}$ − 1), the world record Sophie Germain prime; and 2996863034895 × 2$^{1290000}$ ± 1, the world record twin primes |
| Twin prime Search | No | — | 26 November 2006 | 25 July 2009 | 65516468355 × 2$^{333333}$ ± 1 |
| Woodall Prime Search | No | Yes | July 2007 | Ongoing | 17016602 × 2$^{17016602}$ − 1, largest known Woodall prime |
| Generalized Cullen/Woodall Prime Search | Yes | Yes | 22 October 2016 | Ongoing | 2525532 × 73$^{2525532}$ + 1, largest known generalized Cullen prime |
| Wieferich Prime Search | — | — | 2020 | 2022 | — |
| Wall-Sun-Sun Prime Search | — | — | 2020 | 2022 | — |

### 321 Prime Search

321 Prime Search is a continuation of Paul Underwood's 321 Search which looked for primes of the form 3 · 2$^n$ − 1. PrimeGrid added the +1 form and continues the search up to n = 25M.
Primes known for 3 · 2$^n$ + 1 occur at the following n:
    1, 2, 5, 6, 8, 12, 18, 30, 36, 41, 66, 189, 201, 209, 276, 353, 408, 438, 534, 2208, 2816, 3168, 3189, 3912, 20909, 34350, 42294, 42665, 44685, 48150, 54792, 55182, 59973, 80190, 157169, 213321, 303093, 362765, 382449, 709968, 801978, 916773, 1832496, 2145353, 2291610, 2478785, 5082306, 7033641, 10829346, 16408818 (sequence A002253 in the OEIS)
Primes known for 3 · 2$^n$ − 1 occur at the following n:
    0, 1, 2, 3, 4, 6, 7, 11, 18, 34, 38, 43, 55, 64, 76, 94, 103, 143, 206, 216, 306, 324, 391, 458, 470, 827, 1274, 3276, 4204, 5134, 7559, 12676, 14898, 18123, 18819, 25690, 26459, 41628, 51387, 71783, 80330, 85687, 88171, 97063, 123630, 155930, 164987, 234760, 414840, 584995, 702038, 727699, 992700, 1201046, 1232255, 2312734, 3136255, 4235414, 6090515, 11484018, 11731850, 11895718, 16819291, 17748034, 18196595 (sequence A002235 in the OEIS)

### PRPNet projects

| Project | Active? | Start | End | Best result |
| 27 Prime Search | No | — | March 2022 | 27 × 2$^{7046834}$ + 1, largest known Sierpinski prime for b = 2 and k = 27 27×2$^{8342438}$ − 1, largest known Riesel prime for b = 2 and k = 27 |
| 121 Prime Search | No | — | April 2021 | 121 × 2$^{9584444}$ − 1, largest known Sierpinski prime for b = 2 and k = 121 121 × 2$^{4553899}$ − 1, largest known Riesel prime for b = 2 and k = 121 |
| Extended Sierpinski problem | No | — | 2014 | 90527 × 2$^{9162167}$ + 1 |
| Factorial Prime Search | Yes | — | Ongoing | 147855! − 1, 5th largest known factorial prime |
| Dual Sierpinski problem (Five or Bust) | No | — | All were done (all PRPs were found) | 2$^{9092392}$ + 40291 |
| Generalized Cullen/Woodall Prime Search | No | — | 2017 | 427194 × 113$^{427194}$ + 1, then largest known GCW prime |
| Mega Prime Search | No | — | 2014 | 87 × 2$^{3496188}$ + 1, largest known prime for k = 87 |
| Primorial Prime Search | Yes | 2008 | Ongoing | 3267113# − 1, largest known primorial prime |
| Proth Prime Search | No | 2008 | 2012 | 10223 × 2$^{31172165}$ + 1, largest known Proth prime |
| Sierpinski Riesel Base 5 | No | 2009 | 2013 | 180062 × 5$^{2249192}$ − 1 |
| Wieferich Prime Search | No | 2012 | 2017 | 82687771042557349, closest near-miss above 3 × 10$^{15}$ |
| Wall-Sun-Sun Prime Search | No | 2012 | 2017 | 6336823451747417, closest near-miss above 9.7 × 10$^{14}$ |

## Accomplishments
### AP26

One of PrimeGrid projects was AP26 Search which searched for a record 26 primes in arithmetic progression. The search was successful in April 2010 with the finding of the first known AP26:
    43142746595714191 + 23681770 · 23# · n is prime for n = 0, ..., 25.
    23# = 2·3·5·7·11·13·17·19·23 = 223092870, or 23 primorial, is the product of all primes up to 23.

### AP27

Next target of the project was AP27 Search which searched for a record 27 primes in arithmetic progression. The search was successful in September 2019 with the finding of the first known AP27:
    224584605939537911 + 81292139 · 23# · n is prime for n = 0, ..., 26.
    23# = 2·3·5·7·11·13·17·19·23 = 223092870, or 23 primorial, is the product of all primes up to 23.

### Cullen prime search

PrimeGrid is also running a search for Cullen prime numbers, yielding the two largest known Cullen primes. The first one being the 14th largest known prime at the time of discovery, and the second one was PrimeGrid's largest prime found 6679881 · 2$^{6679881}$ + 1 at over 2 million digits.

### Generalized Fermat prime search

On 24 September 2022, PrimeGrid discovered the largest known Generalized Fermat prime to date, 1963736$^{1048576}$ + 1. This prime is 6,598,776 digits long and is only the second Generalized Fermat prime found for n = 20. It ranks as the 13th largest known prime overall.

### Riesel Problem

As of 13 December 2022, PrimeGrid has eliminated 18 values of k from the Riesel problem and is continuing the search to eliminate the 43 remaining numbers. 3 values of k are found by independent searchers.

### Twin prime search

Primegrid worked with the Twin Prime Search to search for a record-sized twin prime at approximately 58,700 digits. The new world's largest known twin prime 2003663613 × 2$^{195000}$ ± 1 was eventually discovered on January 15, 2007 (sieved by Twin Prime Search and tested by PrimeGrid). The search continued for another record twin prime at just above 100,000 digits. It was completed in August 2009 when Primegrid found 65516468355 × 2$^{333333}$ ± 1. Continued testing for twin primes in conjunction with the search for a Sophie Germain prime yielded a new record twin prime in September 2016 upon finding the number 2996863034895 × 2$^{1290000}$ ± 1 composed of 388,342 digits.

### Woodall prime search

As of 22 April 2018, the project has discovered the four largest Woodall primes known to date. The largest of these is 17016602 × 2$^{17016602}$ − 1 and was found on 21 March 2018. The search continues for an even bigger Woodall prime. PrimeGrid also found the largest known generalized Woodall prime, 563528 × 13$^{563528}$ − 1.

## Media coverage

PrimeGrid's author Rytis Slatkevičius has been featured as a young entrepreneur in The Economist.
PrimeGrid has also been featured in an article by Francois Grey in the CERN Courier and a talk about citizen cyberscience in TEDx Warwick conference.
In the first Citizen Cyberscience Summit, Rytis Slatkevičius gave a talk as a founder of PrimeGrid, named Finding primes: from digits to digital technology, relating mathematics and volunteering and featuring the history of the project.