# Significance of calculating non primes in sequence.

Instead of using a sieve to remove non-primes from the sequence.
6x-1 x =0 to x=n
6x+1 x=0 to x= n
What if you calculate and remove the non-primes. I have determined how to calculate the non-primes in this set. By subtracting them from the entire set you are left with all primes. I find this solution efficient because you can precisely calculate all of the semi primes and roots of the set. No factoring of large numbers is necessary. Furthermore it is not necessary to know what is in the set:
6x-1 x =0 to x=n
6x+1 x=0 to x= n
to do this.
Would an array of this nature be useful as opposed to trying to sieve or predict numbers?
Has anyone seen this done and if so where might I find more information about the effort.

If so how do you suggest I present my solution?
Thanks

Last edited:

I have done the above about 10 years ago. and I will be posting it later. For now I would say just that to get the primes up to N, you only need to consider composites up to N/3.
You start by setting matrices (6i+1)(6j+1)=M1, (6i-1)*(6j-1)=M2 and (6i+1)*(6j-1)=M3.
The nice thing about it is that you really don't need all the "multiplications" to produce the matrices' elements. The second nice thing about the whole thing is that you only need to work with indices instead of the number themselves. A number like 7*7=49 can also be represented by Index(49)=(N-1)/6=(49-1)/6=8. Once you produce the matrices of indices, you have all you need to find the primes. They will be the ones whose indices cannot be produced ( or indices which cannot be a matrix element of M1, M2 or M3 ). Then it's just a matter of sorting out a list of indices from 1,N.
I will try to find a write up and will post it later.