Show HN:Primeward 探索用有状态递推求下一个素数
来源标题:Show HN: Primeward – Exploring a stateful recurrence for the next prime
Primeward 在 Hacker News 的 Show HN 板块发布,尝试用有状态递推方法寻找下一个素数。该项目的核心是把递推过程保留状态,而不是每次从头计算。目前仅作为探索性项目展示。
以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。
I started with a question: can we advance from prime to prime by updating a reusable arithmetic state, somewhat like a more involved Fibonacci recurrence?Primeward is a Python research prototype exploring that idea. It builds on established next-prime formulas: extract the immediate next prime from the current state, incorporate that prime, and repeat. A finite mathematical bound and interval arithmetic allow the implementation to recover an exact integer.The construction uses the Riemann zeta function and Euler products; no assumption about the location of the zeta function’s nontrivial zeros is required.The repository includes the implementation, an optimized variant, independent correctness tests, sieve baselines, and recorded experiments. The current approach is expensive and slower than the sieve baselines. The research question is how much we can reduce the arithmetic history and numerical precision needed to initialize, update, and decode the state while preserving exact results.I’m interested in related work and ideas for reducing those costs.https://github.com/alexhraber/primeward Comments URL: https://news.ycombinator.com/item?id=50584109 Points: 1
Comments: 0
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。