Message boards : Science : Software
Message board moderation
Author | Message |
---|---|
![]() ![]() Send message Joined: 24 Dec 24 Posts: 259 Credit: 4,980,088 RAC: 30,808 ![]() ![]() ![]() ![]() ![]() ![]() |
The working program (performing calculations) runs in the PARI/GP software shell. https://pari.math.u-bordeaux.fr/download.html The working program is written in the PARI/GP language. The authors of the program are me and my colleague Sergei Grishin. I am publishing the text of the work program {pt=[0, 6, 24, 36, 66, 84, 90, 114, 120, 126, 150, 156, 174, 204, 216, 234, 240]; w=37; tin = fileopen("in"); np1=eval(filereadstr(tin)); np2=eval(filereadstr(tin)); fileclose(tin); pl=#pt; nw=primepi(w); prs=primes(nw); period=vecprod(prs); vp=vector(np2-np1+1, i, period*(np1-1+i)); lvp=#vp; vmy=vector(40); pat1=vector(17); pat2=vector(17); lpr=1; wd=vector(nw); for( ip=1,nw, rip=[]; for( r=1,prs[ip]-1, for( i=1,pl, if( (r+pt[i])%prs[ip]==0, next(2))); rip =concat(rip,r) ); lpr=lpr*#rip; wd[ip]=rip; ); \\for ip fout = fileopen("out","w"); k=0; forvec(v=vector(#wd,i,[1,#wd[i]]), k++; form=lift(chinese( vector( #wd,j,Mod( wd[j][v[j]], prs[j]) ) )); \\ начало проверки кортежа foreach(vp,bpp, bpt=form+bpp; if(ispseudoprime(bpt) && ispseudoprime(bpt+240), l=0; forprime(p=bpt,bpt+240, l++; vmy[l]=p; ); if(l==17, for(m=2,17, pat1[m]=vmy[m]-vmy[1]; ); pat2=vector(17,i,(pat1[i]==pt[i])); vlds=vecsum(pat2); if(vlds>10, w=strprintf( "%d: %d\nvalids=%d\n",vmy[1],pat1,vlds ); print(w); filewrite(fout,w); );\\if vlds>10 ); \\ if l==17 );\\ if ispseudoprime );\\ foreach \\ конец проверки кортежа );\\ forvec w=strprintf("end "); print(w); filewrite(fout,w); fileclose(fout) } quit If you have any suggestions for optimizing the work program, please let me know in this thread or write me a PM. |
![]() Send message Joined: 30 Dec 24 Posts: 2 Credit: 374,974 RAC: 1,900 ![]() ![]() |
As I understand, the "in" file contains somehow the range of the search. The "out" file somehow the result. What is the total search range in in which steps? What does it calculate? Is there some description of the science, maybe a wikipedia link? |
![]() ![]() Send message Joined: 24 Dec 24 Posts: 259 Credit: 4,980,088 RAC: 30,808 ![]() ![]() ![]() ![]() ![]() ![]() |
The main definitions on the topic of the project can be found on the page "Problem 62. Symmetric k-tuples of consecutive primes" http://www.primepuzzles.net/problems/prob_062.htm See also https://en.wikipedia.org/wiki/Prime_k-tuple https://boinc.mak.termit.me/odlk2025/forum_thread.php?id=3&postid=5 As I understand, the "in" file contains somehow the range of the search. Yes. What is the total search range in in which steps? General search range (7858321551080267055879090, 557940830126698960967415390). The task specifies an interval from np1 to np2. Example WU 1227902370890 1227902370899 This means np1 = 1227902370890 np2 = 1227902370899 The transition to real numbers of the range is performed according to the formula from {x} = period*np1 + {d} to {y} = period*np2 + {d}, here period = 7420738134810 = 37# {d} – a set of constants calculated using the Chinese remainder theorem. See more details of the project here https://boinc.progger.info/odlk/forum_thread.php?id=290 (in Russian) |
![]() ![]() Send message Joined: 24 Dec 24 Posts: 259 Credit: 4,980,088 RAC: 30,808 ![]() ![]() ![]() ![]() ![]() ![]() |
yoyo_rkn If you still have questions, please ask. |
![]() Send message Joined: 30 Dec 24 Posts: 2 Credit: 374,974 RAC: 1,900 ![]() ![]() |
Ok, I read the wikipedia artikel and the German one, https://de.wikipedia.org/wiki/Primzahltupel , explained it for k=2, 3, 4, .... up to 8. So I think I understood that k consecutive primes should be found, where the difference between the first and last should be minimized. Sorry, I'm not a math scientist. And your GP script at the beginning of this thread searches for K=17. |
![]() ![]() Send message Joined: 24 Dec 24 Posts: 259 Credit: 4,980,088 RAC: 30,808 ![]() ![]() ![]() ![]() ![]() ![]() |
Sorry, I'm not a math scientist. No problem. I also recommend you look at the article https://pzktupel.de/ktpatt_hl.php |
©2025 Natalia Makarova and Co