Metadata-Version: 2.4
Name: primehelix
Version: 1.0.0
Summary: Structural analysis for integers — classify, scan, compare, and track number structure using a shared label language
Author-email: Jonathan Kendall <onojk123@gmail.com>
License: MIT License
        
        Copyright (c) 2026 Jonathan Kendall
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/onojk/primehelix
Project-URL: Repository, https://github.com/onojk/primehelix
Project-URL: Bug Tracker, https://github.com/onojk/primehelix/issues
Keywords: prime,factorization,number-theory,structure,semiprime,residue
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: gmpy2>=2.1
Requires-Dist: click>=8.1
Requires-Dist: rich>=13.0
Provides-Extra: plot
Requires-Dist: matplotlib>=3.5; extra == "plot"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-timeout; extra == "dev"
Requires-Dist: matplotlib>=3.5; extra == "dev"
Dynamic: license-file

# On the Distribution of Smaller Factors in Semiprimes
*Jonathan Kendall, 2026*

An empirical study of the coordinate θ = log p / log n for semiprimes n = pq (p ≤ q).
Exact enumeration up to N ≤ 10⁸ shows that the proportion P(N, θ₀) of semiprimes
with θ ≤ θ₀ increases monotonically with N, consistent with O(1/log log N) decay toward
a limiting value — the classical rate for related semiprime counts (Montgomery–Vaughan §7.4).
A novel discrete activation phenomenon is documented: each prime p contributes a visible
step in P(N, θ₀) when N crosses p^(1/θ₀). A refined heuristic prefactor
f(θ₀) = log(1/θ₀) − θ₀ − log 2 + ½ reduces the maximum relative prediction error
for δ · log log N from 4.3× (naive Mertens) to under 1.21× across θ₀ ∈ [0.10, 0.45].
Several geometric and spectral embeddings (additive phase wrapping, multiplicative phase
maps, spectral fingerprint, factor-ratio spectrum) all fail to recover the structure
carried by θ, consistent with a separation principle: factor asymmetry is not recoverable
from any function of n alone that is multiplicative or additive in log-space.

## Paper

**"On the Distribution of Smaller Factors in Semiprimes:
Discrete Activation Thresholds, Slow Convergence, and a
Refined Heuristic"** — Jonathan Kendall, 2026

[📄 Read the paper (PDF)](paper/paper.pdf) |
[Submitted to *Integers: Electronic Journal of
Combinatorial Number Theory*]

To reproduce all paper results exactly:
```
python3 scripts/verify_semiprime_tables.py
```

The PrimeHelix toolkit (CLI, visualizations, structure-scan)
is a separate research tool built alongside the paper.

## Requirements
- Python 3.8+, numpy, scipy, matplotlib
- ~400 MB RAM for SPF sieve to N = 1e8
- Runtime: ~8 minutes

## Reproduce all results
```
python3 scripts/verify_semiprime_tables.py
```

`scripts/verify_semiprime_tables.py` is the canonical script (commit fc43ef0).
`scripts/verify_paper_tables.py` is an earlier version kept for reference only.

## Outputs
- results/table1.csv, table2.csv, table3.csv
- activation_theta_0_10.png
- stabilisation.png

## Verified checksums (exact, no sampling)
- 210,035 semiprimes ≤ 1e6
- 1,904,324 semiprimes ≤ 1e7
- 17,427,258 semiprimes ≤ 1e8

## Repository structure
```
paper/          — paper.tex, cover_letter.tex, paper.pdf (canonical)
paper/drafts/   — earlier draft versions
scripts/        — all Python and shell scripts
figures/        — all generated plots
datasets/       — raw data CSVs and JSON
results/        — CSV outputs from verification script
```
