DevTrends开发者趋势
主题色

产品

Primeward – Exploring a stateful recurrence for the next prime

I’ve published Primeward, a Python research prototype. I started with a question: can we calculate the next prime from what we already know, rather than find it by brute force? The implementation builds on known next-pri…

DT研究与学习

关于

I’ve published Primeward, a Python research prototype. I started with a question: can we calculate the next prime from what we already know, rather than find it by brute force? The implementation builds on known next-prime formulas. It uses a finite bound and interval arithmetic to extract the exact next prime from a stored arithmetic state, then updates that state and repeats. It uses the Riemann zeta function and Euler products without assuming the Riemann Hypothesis. The repo includes the implementation, an optimized version, correctness tests, sieve baselines, benchmarks, and research notes. It’s currently slower than sieving. Building the initial state and maintaining enough numerical precision are expensive. I want to see how much we can reduce those costs while still calculating the exact next prime. I’m interested in related work and ideas for reducing those costs. github.com/alexhraber/primeward

收录记录

  1. Show HN

    2026年11月21日 · 1 次收录

讨论这个产品