A Binary Scalar Characterization of Primality via Repunit Words and Shifted GCD Sums
We study the repunit word R_n = 2^n - 1, viewed both as an integer and as the binary word of n consecutive ones. Using the classical identity gcd(2^a - 1, 2^b - 1) = 2^gcd(a,b) - 1, we derive a scalar binary characterization of primality for the index n. If W = R_n, then for n >= 2, n is prime if and only if the sum from k = 0 to n - 1 of gcd(W, W shifted right by k) is equal to W + popcount(W) - 1. Since popcount(R_n) = n, the criterion can also be written as the same sum being equal to R_n + n - 1. The interest of the result is structural rather than algorithmic: primality of the index is encoded inside a single binary object W, together with the operations gcd, right shift, addition, and population count. The theorem may be read as a compact binary reformulation of primality within a dyadic framework based on the power-of-two transform.
Authors
- Ricardo Adonis Caraccioli Abrego
Institutions
- National Autonomous University of Honduras (HN)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-03-21
- DOI
- https://doi.org/10.5281/zenodo.19150295
- Primary Topic
- Advanced Combinatorial Mathematics
- Type
- article
- Field-Weighted Citation Impact
- 0.00