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

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-03-21
DOI
https://doi.org/10.5281/zenodo.19143951
Primary Topic
Advanced Combinatorial Mathematics
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A Binary Scalar Characterization of Primality via Repunit Words and Shifted GCD Sums

Ricardo Adonis Caraccioli Abrego
Zenodo (CERN European Organization for Nuclear Research)
Advanced Combinatorial Mathematics
article

A Binary Scalar Characterization of Primality via Repunit Words and Shifted GCD Sums

Ricardo Adonis Caraccioli Abrego
article en

Abstract

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.

Zenodo (CERN European Organization for Nuclear Research)
National Autonomous University of Honduras (HN)
Reduced inequalities
Openalex Percentile: Top 12%
Advanced Combinatorial Mathematics
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.