r/computerscience • • Mar 20 '25

New prime algorithm I just made

Hi, I just published a research paper about a new prime generation algorithm that's alot more memory efficient than the sieve of Eratosthenes, and is faster at bigger numbers from some tests I made. Here's the link to the paper : https://doi.org/10.5281/zenodo.15055003 there's also a github link with the open-source python code, what do you think?

100 Upvotes

89 comments sorted by

View all comments

Show parent comment

9

u/nrogers924 Mar 21 '25 edited Mar 21 '25

In the abstract you seem to claim that your algorithm has O(N) space but later in the paper you state that it has O(sqrt(N)) space, however in the methodology you seem to state that O(N) primes are stored in the heap? Without an in depth look it appears at a glance that your algorithm does not actually achieve better space complexity than currently available algorithms, and this is in addition to the fact that you haven’t proven that it actually generates all primes

Edit: looking over the paper more you definitely alternate between claiming O(N) space complexity and O(sqrt(N)) complexity. Reading your comments I’m also not sure you understand the concept of asymptotic behavior or what it means for an algorithm to “scale better”. After skimming your python I see that you are comparing against a naive implementation of a sieve rather than an optimized implementation. From what I can tell your algorithm is not distinct from available algorithms or the algorithms in your references. Your references are also not properly used in the paper, you seem to place a couple in text citations randomly, it is unclear what information if any is pulled from the reference near these citations although it appears your entire work is based around them. Implementing things is a great way to learn but attempting to present what you have done in the form of a research paper will lead to much greater scrutiny than is necessary for a project of this scope. I won’t spend too much time going through the papers you referenced but from a glance I would guess that if you tried to publish this in a serious setting you would face accusations of plagiarism supposing it wasn’t desk rejected for reasons explained by other commenters