In mathematics, a Cunningham chain is a certain sequence of prime numbers. Cunningham chains are named after mathematician A. J. C. Cunningham. They are also called chains of nearly doubled primes.
A Cunningham chain of the first kind of length n is a sequence of prime numbers (p1, ..., pn) such that for all 1 ≤ i < n, pi+1 = 2pi + 1. (Hence each term of such a chain except the last one is a Sophie Germain prime, and each term except the first is a safe prime).
It follows that
Or, by setting (the number is not part of the sequence and need not be a prime number), we have