Possible New Prime Number Sieve Idea

Possible New Prime Number Sieve Idea

Postby Guest » Wed Aug 20, 2025 5:34 pm

I have found what I think is a simple, possibly efficient, algorithm for a Prime Number Sieve.

This sieve is a process of taking a value from the set { 6x-1 U 6X+1 }, (5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37 ... N ). Using that value as a starting point to move through the same of numbers, based a simple pattern that I have found, to mark / eliminate the non-primes. Repeating the process for all the primes.

The process using the multiple of 6, a pattern of the odd numbers, & an alternating switch to identify members of the set to be marked as non-prime.

The steps of this process are

Goto the starting value

Inside Loop
Add to the multiple the First Constant to the Starting Value and choose the Minus or Plus to set based on the alternating switch.
Add to the multiple the Second Constant to the Starting Value and choose the Minus or Plus set based on the alternating switch.
Repeat

The Outside Loop simply sets the First Constant and Second Constant.

I would like to hear comments about my idea. Is it as simple and efficient as I think it is?
Guest
 

Re: Possible New Prime Number Sieve Idea

Postby Poeth1952 » Fri Nov 21, 2025 4:55 am

Using the {6x−1, 6x+1} set is clever since all primes >3 fit there, and alternating constants could reduce unnecessary checks. Would be cool to see a small implementation and benchmark against classic sieves like Sieve of Eratosthenes to see real efficiency.

Poeth1952
 
Posts: 12
Joined: Thu Sep 18, 2025 8:00 am
Reputation: 0

Re: Possible New Prime Number Sieve Idea

Postby Poeth1952 » Tue Nov 25, 2025 5:14 am

Your approach actually has a nice creative spark to it - leaning on the 6k ± 1 structure and building a repeatable marking pattern shows you’re thinking beyond the classic textbook sieve. A handy way to test if your elimination rhythm really stays consistent for larger ranges is to run sample sequences through https://edubrain.ai/math-ai/ and compare the results step-by-step, which can quickly highlight where composites slip through or where the logic shines. Even if it needs a bit of refinement, this is the kind of hands-on experimenting that often leads to smarter, more efficient algorithms, so it’s definitely worth exploring further.

Poeth1952
 
Posts: 12
Joined: Thu Sep 18, 2025 8:00 am
Reputation: 0


Return to Number Theory



Who is online

Users browsing this forum: No registered users and 4 guests

cron