Arithmetic closed forms count the Mersenne primes, the Fermat primes and the twin-prime pairs
Abstract
We construct closed forms that generate with repetitions all Mersenne primes, respectively all Fermat primes, all twin-prime pairs and all Sophie Germain primes. Also, we construct closed forms that count all Mersenne primes between and , respectively all Fermat primes between and and all twin-prime pairs between and . Every closed form is an arithmetic term, i. e. a fixed finite composition of the following arithmetic operations: addition, subtraction, multiplication, division with remainder and the exponentiation . While for generating these sets with repetitions, only Wilson's Theorem is applied, for the counting forms we use more specific tests, i.e. Lucas-Lehmer, respectively Pepin, and we apply to some extent Jones' work (see Acta Arithmetica XXXV, pg. 210 - 221, 1979). To count twin primes we apply Clement's Theorem, which is closely related to Wilson's. A closed form to count the Sophie Germain primes can be constructed similarly.
Keywords
Cite
@article{arxiv.2512.01680,
title = {Arithmetic closed forms count the Mersenne primes, the Fermat primes and the twin-prime pairs},
author = {Mihai Prunescu},
journal= {arXiv preprint arXiv:2512.01680},
year = {2025}
}