![]() |
|
|
#793 | |
|
May 2010
Prime hunting commission.
32208 Posts |
Quote:
|
|
|
|
|
|
|
#794 | |
|
"Forget I exist"
Jul 2009
Dumbassville
20C016 Posts |
Quote:
Code:
sievex(kmin,kmax,b,n,pmax)= for(k=kmin,kmax,forprime(p=1,pmax,if((k*b!^n+1)%p==0 && (k*b!^n+1)!=p,print("found factor " p " for "k"*"b"!^"n"+1"))))
I think I could improve it one more way. should i try to help it more ? Last fiddled with by science_man_88 on 2010-08-23 at 22:43 |
|
|
|
|
|
|
#795 | |
|
May 2010
Prime hunting commission.
24·3·5·7 Posts |
Quote:
|
|
|
|
|
|
|
#796 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
would you rather it spit out when it found a factor or when it hasn't(less printing I think).
|
|
|
|
|
|
#797 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
one thing to stop limitation (though going far enough with pmax it may slow down)
a code to check if it's above primelimit if not use the code already made if not use another code. so basically Code:
if(pmax>default(primelimit),code1,code2) |
|
|
|
|
|
#798 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
Code:
sievex(kmin,kmax,b,n,pmax)={a=0;for(k=kmin,kmax,forprime(p=1,pmax,if((k*b!^n+1)%p==0 && (k*b!^n+1)!=p,a=a+1)));if(a==0,print("no factor found for "k"*"b"!^"n"+1 in this range");a=0)}
|
|
|
|
|
|
#799 | |
|
May 2010
Prime hunting commission.
24·3·5·7 Posts |
Quote:
|
|
|
|
|
|
|
#800 | |
|
Mar 2006
Germany
1011010111002 Posts |
Quote:
|
|
|
|
|
|
|
#801 | |
|
May 2010
Prime hunting commission.
24×3×5×7 Posts |
Quote:
Code:
57133839564458545904789328652610540031895535786011264182548375833179829124845398393126574488675311145377107878746854204162666250198684504466355949195922066574942592095735778929325357290444962472405416790722118445437122269675520000000000000000000000000000000000000 * 19!6 + 1 Last fiddled with by 3.14159 on 2010-08-23 at 23:56 |
|
|
|
|
|
|
#802 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
your guess is as good as mine there Pi:
Code:
(20:53) gp > sievex(1,10,6,1,500000) found factor 7 for 1*6!^1+1 found factor 103 for 1*6!^1+1 found factor 11 for 2*6!^1+1 found factor 131 for 2*6!^1+1 found factor 43 for 4*6!^1+1 found factor 67 for 4*6!^1+1 found factor 13 for 5*6!^1+1 found factor 277 for 5*6!^1+1 found factor 29 for 6*6!^1+1 found factor 149 for 6*6!^1+1 found factor 71 for 7*6!^1+1 found factor 7 for 8*6!^1+1 found factor 823 for 8*6!^1+1 found factor 19 for 10*6!^1+1 found factor 379 for 10*6!^1+1 time = 281 ms. <)%p==0 && (k*b!^n+1)!=p,a=a+1)));if time = 0 ms. %270 = (kmin,kmax,b,n,pmax)->a=0;for (20:54) gp > sievex(1,10,6,1,500000) Last fiddled with by science_man_88 on 2010-08-23 at 23:58 |
|
|
|
|
|
#803 | |
|
Mar 2006
Germany
1011010111002 Posts |
Quote:
|
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Why do I sometimes see all the <> formatting commands when I quote or edit? | cheesehead | Forum Feedback | 3 | 2013-05-25 12:56 |
| Passing commands to PARI on Windows | James Heinrich | Software | 2 | 2012-05-13 19:19 |
| Ubiquity commands | Mini-Geek | Aliquot Sequences | 1 | 2009-09-22 19:33 |
| 64-bit Pari? | CRGreathouse | Software | 2 | 2009-03-13 04:22 |
| Are these commands correct? | jasong | Linux | 2 | 2007-10-18 23:40 |