# Cunningham chain

In

mathematics, a

**Cunningham chain** is a certain sequence of

prime numbers. Cunningham chains are named after

mathematician A. J. C. Cunningham.

A **Cunningham chain of the first kind** is a sequence of prime numbers (*p*_{1},...,*p*_{n}) such that for all 1 ≤ *i* < *n*, *p*_{i} is a Sophie Germain prime - that is, *p*_{i+1} = 2 *p*_{i} + 1. Similarly, a **Cunningham chain of the second kind** is a sequence of prime numbers (*p*_{1},...,*p*_{n}) such that for all 1 ≤ *i* < *n*, *p*_{i+1} = 2 *p*_{i} - 1.

Cunningham chains are also sometimes generalized to sequences of prime numbers (*p*_{1},...,*p*_{n}) such that for all 1 ≤ *i* < *n*, *p*_{i+1} = *ap*_{i} + *b* for fixed relatively prime integers *a*, *b*; the resulting chains are called **generalized Cunningham chains**.

A Cunningham chain is called **complete** if it cannot be further extended, i.e., if the next term in the chain would not be a prime number anymore.