hermann on Thu, 28 Mar 2024 20:42:09 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: How to efficiently count Proth primes with GP parfor?


On 2024-03-24 00:57, hermann@stamm-wilbrandt.de wrote:

Having all Proth primes up to 2^40 allows to analyze distribution
of Proth primes for all 1<=m<=20 (p=k*2^m+1, k<2^m) for a given m.

I did distribution analysis as part of this posting:
https://www.mersenneforum.org/showthread.php?p=653526#post653526

I) All 122,742 Proth primes below 2^40
II) distribution of "k"s for a fixed 1≤m≤20
...
Not the same, but related.
It turned out that there are 4 webpages with all Proth primes k*2^m+1
exponents for odd 0<k<1200. After scraping relevant parts with
bash and sed scripts, a XSLT stylesheet xformed the now XML files
and result is single Proth.json:

https://raw.githubusercontent.com/Hermann-SW/Proth/main/Proth.json

Odd k entries are arrays of Proth prime exponents for that k.
Entries k+1 store each k's Lim value, the guaranteed m all
Proth prime exponents are stored.

$ gp -q
? P=readvec("Proth.json")[1];
? #P
1200
?

Proth.json contains these many primes:

? vecsum([#P[2*i-1]|i<-[1..600]])
22413
?

All odd 0<k<1200 have all exponents for at least 3,600,000(!):

? vecmin([P[2*i]|i<-[1..600]])
3600000
?

So all Proth primes k*2^m+1 with odd 0<k<1200 and all 0<m<3,600,000
are subset of Proth.json.


Validation code did not run initially and identified a missing command in one HTML page:

? forstep(k=1,1200,2,for(i=2,#P[k],if(P[k][i]<=P[k][i-1],print(k," ",i))));
?


Regards,

Hermann.