Definition:Cunningham Chain

Definition
A Cunningham chain is a (finite) sequence $\left({p_1, p_2, \ldots, p_n}\right)$ such that:


 * $(1): \quad \forall i \in \left\{ {1, 2, \ldots, n - 1}\right\}: p_{i + 1} = 2 p_i + 1$
 * $(2): \quad p_i$ is prime for all $i \in \left\{ {1, 2, \ldots, n - 1}\right\}$
 * $(3): \quad n$ is not prime such that $2 n + 1 = p_1$
 * $(4): \quad 2 p_n + 1$ is not prime.

Thus:
 * each term except the last is a Sophie Germain prime
 * each term except the first is a safe prime.