Published June 13, 2026 | Version 1.0.0
Preprint Restricted

Hierarchical Structure and Chi-Square Decomposition in Twin Prime Residue Classes Modulo Primorials: Data and Reproducibility Package

  • 1. Independent Researcher

Description

Hierarchical Structure and Chi-Square Decomposition in Twin Prime Residue Classes Modulo Primorials: Data and Reproducibility Package

This repository contains the complete reproducibility package accompanying the research article:

"Hierarchical Structure and Chi-Square Decomposition in Twin Prime Residue Classes Modulo Primorials"

The project investigates the distribution of twin primes across admissible residue classes modulo successive primorials and studies the hierarchical structure induced by the Chinese Remainder Theorem (CRT).

The main theoretical contribution is an exact hierarchical decomposition of the Pearson chi-square statistic into between-family and within-family components across successive primorial levels. The decomposition reveals a recursive propagation law throughout the CRT hierarchy, whereby the between-family contribution at a given level is exactly equal to the chi-square statistic at the previous primorial level.

Repository Contents

Manuscript

The repository includes:

• Complete LaTeX source files

• Bibliographic database (.bib)

• Final compiled PDF manuscript

• Figures used in the publication

Dataset

The dataset consists of approximately 10 million verified twin-prime pairs used throughout the analysis.

The data were used to compute:

• admissible residue-class frequencies

• Pearson chi-square statistics

• hierarchical CRT decompositions

• conditional within-family statistics

• Monte Carlo validation results

Source Code

The repository contains all Python scripts required to reproduce the analysis, including:

• admissible residue-class counting

• primorial hierarchy construction

• chi-square decomposition calculations

• conditional multinomial simulations

• Monte Carlo validation procedures

• figure-generation scripts

All scripts are provided in fully editable form and can be executed independently.

Statistical Analysis

The study includes:

• construction of admissible residue systems modulo successive primorials

• exact CRT-based decomposition of the Pearson chi-square statistic

• verification of the decomposition throughout the primorial hierarchy

• definition of a conditional within-family statistic

• estimation of effective conditional degrees of freedom

• conditional multinomial Monte Carlo simulations

• comparison between empirical fluctuations and conditional multinomial expectations

Main Results

The principal theoretical result is the exact identity

χ²_k = χ²_between,k + χ²_within,k

together with the recursive propagation law

χ²_between,k = χ²_(k−1).

This decomposition shows that statistical fluctuations propagate through the CRT hierarchy in a structured manner rather than arising independently at each primorial level.

Empirically, the observed fluctuations are consistently smaller than those predicted by both unconditional and conditional multinomial reference models. Monte Carlo simulations preserving the observed family totals reproduce the conditional multinomial expectation but fail to reproduce the observed suppression of within-family fluctuations.

These results provide evidence for a nontrivial hierarchical statistical structure associated with admissible residue classes modulo primorials.

Reproducibility

All tables, figures, and numerical results reported in the manuscript can be regenerated directly from the provided data and source code.

The purpose of this repository is to provide complete computational transparency and enable independent verification of every numerical result presented in the study.

Author

Victor Eduardo Morales Córdoba

Independent Researcher

Heredia, Costa Rica

ORCID: 0009-0000-8787-6141

E-mail: vmorales@uned.cr

DOI

DOI: 10.5281/zenodo.20682313

Files

Restricted

The record is publicly accessible, but files are restricted. Log in to check if you have access.