Mersenne primes
Content created by Fredrik Bakke, Jonathan Prieto-Cubides, Egbert Rijke and Eléonore Mangel.
Created on 2022-03-18.
Last modified on 2023-03-10.
module elementary-number-theory.mersenne-primes where
Imports
open import elementary-number-theory.distance-natural-numbers open import elementary-number-theory.exponentiation-natural-numbers open import elementary-number-theory.natural-numbers open import elementary-number-theory.prime-numbers open import foundation.cartesian-product-types open import foundation.dependent-pair-types open import foundation.identity-types open import foundation.universe-levels
Idea
A Mersenne prime is a prime number that is one less than a power of two.
Definition
is-mersenne-prime : ℕ → UU lzero is-mersenne-prime n = is-prime-ℕ n × Σ ℕ (λ k → dist-ℕ (exp-ℕ 2 k) 1 = n) is-mersenne-prime-power : ℕ → UU lzero is-mersenne-prime-power k = is-prime-ℕ (dist-ℕ (exp-ℕ 2 k) 1)
Recent changes
- 2023-03-10. Fredrik Bakke. Additions to
fix-import
(#497). - 2023-03-07. Fredrik Bakke. Add blank lines between
<details>
tags and markdown syntax (#490). - 2023-03-07. Jonathan Prieto-Cubides. Show module declarations (#488).
- 2023-03-06. Fredrik Bakke. Remove redundant whitespace in headers (#486).
- 2023-03-05. Jonathan Prieto-Cubides. Add “suggest an edit” button and minor fix (#484).