## Introduction

The Cunningham Project
seeks to factor so-called “Cunningham numbers”,
these are numbers of the form *b*^{n} ± 1,
for *b* = 2, 3, 5, 6, 7, 10, 11, 12 and *n* small.

Unfortunately, it seems that the tables from the Cunningham Project are not meant to be parsed by a computer program (actually, while creating this page I found out about Paul Leyland's tables, which are much better). That's why I decided to create this page. It contains the Cunningham Tables and some extensions in a machine-readable format, as well as lists of the primes and composites occuring in the tables. These tables are also incorporated in my fullfactor package for PARI/GP.

These tables contain the factorizations of *b*^{n} ± 1,
including the non-primitive (algebraic) part.
In the case of Aurifeuillian (*L*·*M*) factorizations,
the *L* and *M* parts are not separated.
If for certain *b* and *n*,
both *b*^{n} - 1 and *b*^{n} + 1 are in the table,
then the implied factorization of *b*^{2n} - 1 is also given.
All this also explains why some numbers in my tables have
multiple unfactored composites.

## Sources

My tables were last updated on **2014-05-25**,
amalgamating all data from the following sources:

- http://homes.cerias.purdue.edu/~ssw/cun/pmain611
- http://homes.cerias.purdue.edu/~ssw/cun/appa611
- http://homes.cerias.purdue.edu/~ssw/cun/page121
- http://homes.cerias.purdue.edu/~ssw/cun/page122
- http://homes.cerias.purdue.edu/~ssw/cun/page123
- http://homes.cerias.purdue.edu/~ssw/cun/page124
- http://homes.cerias.purdue.edu/~ssw/cun/page125
- http://homes.cerias.purdue.edu/~ssw/cun/xtend/main3m
- http://homes.cerias.purdue.edu/~ssw/cun/xtend/appa3m
- http://homes.cerias.purdue.edu/~ssw/cun/xtend/up3m
- http://homes.cerias.purdue.edu/~ssw/cun/xtend/main3p
- http://homes.cerias.purdue.edu/~ssw/cun/xtend/appa3p
- http://homes.cerias.purdue.edu/~ssw/cun/xtend/up3p
- http://homes.cerias.purdue.edu/~ssw/cun/xtend/3LM
- http://homes.cerias.purdue.edu/~ssw/cun/xtend/3LMext
- http://homes.cerias.purdue.edu/~ssw/cun/xtend/other
- http://www.leyland.vispa.com/numth/factorization/cunningham/2+.txt
- http://www.leyland.vispa.com/numth/factorization/cunningham/3+.txt
- http://www.leyland.vispa.com/numth/factorization/cunningham/5+.txt
- http://www.leyland.vispa.com/numth/factorization/cunningham/6+.txt
- http://www.leyland.vispa.com/numth/factorization/cunningham/7+.txt
- http://www.leyland.vispa.com/numth/factorization/cunningham/10+.txt
- http://www.leyland.vispa.com/numth/factorization/cunningham/11+.txt
- http://www.leyland.vispa.com/numth/factorization/cunningham/12+.txt
- http://www.leyland.vispa.com/numth/factorization/cunningham/2-.txt
- http://www.leyland.vispa.com/numth/factorization/cunningham/3-.txt
- http://www.leyland.vispa.com/numth/factorization/cunningham/5-.txt
- http://www.leyland.vispa.com/numth/factorization/cunningham/6-.txt
- http://www.leyland.vispa.com/numth/factorization/cunningham/7-.txt
- http://www.leyland.vispa.com/numth/factorization/cunningham/10-.txt
- http://www.leyland.vispa.com/numth/factorization/cunningham/11-.txt
- http://www.leyland.vispa.com/numth/factorization/cunningham/12-.txt
- http://www.leyland.vispa.com/numth/factorization/cunningham/3LM.txt
- http://www.leyland.vispa.com/numth/factorization/cunningham/UPDATE.txt
- http://gmplib.org/~tege/fac10m.txt
- http://gmplib.org/~tege/fac10p.txt

Occasionaly, I will also add factors by hand, if I happen to learn about a new factorization.

Instead of trying to parse any of this,
I just extract all numbers using some `sed` hacking.
Then I use PARI/GP
to figure out which Cunningham numbers are multiples of the factors,
from there it is easy to make the tables.
This whole process takes about an hour.
There are sanity checks along the way to make sure the data is correct
(the worst that could happen is that my tables list a composite for which the factorization
is already known).

Everything is completely automatic, from the downloading of the sources, to updating this webpage. My tables should be remade within a day whenever one of the sources changes.

## Main Tables

These give the factorizations of *b*^{n} ± 1.
Lines are of the form

`(2,81+) 3.3.3.3.3.19.163.87211.<36839260481113>`

This example gives the partial factorization of 2^{81} + 1,
with angle brackets around composites.
All other factors are BPSW pseudoprimes (using PARI/GP's `ispseudoprime()` function).

Download main.gz (1 618 681 bytes gzip'ed text file).

## Primes

This is a list of all prime factors > 500 000 occuring in the Main Tables. Currently, there are 22928 primes in this table. Lines are of the form

`(3,115-) 52370346649565455417091`

This means that 52370346649565455417091 is a prime factor of 3^{115} - 1.
Obviously, this prime also divides 3^{230} - 1,
but in the file every factor is given only once per base.
However, the prime 1505447 (and others) occurs twice in this file,
because it divides 2^{173} - 1, as well as 6^{229} - 1.

Download primes.gz (573 031 bytes gzip'ed text file).

## Composites

This lists the 406 composites in the Main Tables, which have not been factored yet. The format is the same as the primes table above.

Download composites.gz (55 514 bytes gzip'ed text file).

## Links

- Sam Wagstaff's page: The ‘official’ resource about the Cunningham Project. Without this, I couldn't have made my tables.
- Paul Leyland's page: Also has some nice tables with factorizations of the Cunningham numbers.
- NFS@Home: A distributed computing project to factor Cunningham numbers using the Number Field Sieve.
- ECMNET: Another distributed computing project, using the Elliptic Curve Method to find ‘small’ factors.
- mersenneforum.org: A forum about the GIMPS project, as well as other factoring projects mentioned above.