[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math

Search:


View post   

>> No.10024082 [View]
File: 15 KB, 362x139, pp primality test for a number a.jpg [View same] [iqdb] [saucenao] [google]
10024082

>>10023960
>It is not logically possible to write a one function that does "entire sieve of erastothenes at once". What you are doing is composing functions.

The entire Sieve can be represented or extracted to a single periodic summation.
That sum, which is numfac, contains all the info of the sieve at once. They aren't constructions, that is you don't need to know any set of numbers in advance, like knowing the primes to find the primes. This is especially true since the sum is valid to infinity, and thus can be taken as a whole. If it equals 2 for a given x, it's prime, as long as j >=x.

You can manipulate numfac to give the exact distribution, and further manipulate that to give a recursive sequence for any nth prime. The result is a single variable equation that terminates on the nth prime, and if you use the product polynomial version, you have the entire family of functions calculable in polynomial time.

Navigation
View posts[+24][+48][+96]