quality:corruption, quality:correction
Generalizations

The simplest generalized Mersenne primes are prime numbers of the form f (2), where f (x) is a low-degree polynomial with small integer coefficients. An example is 2 − 2 + 1, in this case, n = 32, and f (x) = x − x + 1; another example is 2 − 2 − 1, in this case, n = 64, and f (x) = x − x − 1.

It is also natural to try to generalize primes of the form 2 − 1 to primes of the form b − 1 (for b ≠ 2 and n > 1). However (see also theorems above), b − 1 is always divisible by b − 1, so unless the latter is a unit, the former is not a prime. This can be remedied by allowing b to be an algebraic integer instead of an integer: