![]() |
|
|
#12 |
|
"Robert Gerbicz"
Oct 2005
Hungary
27168 Posts |
All of the posted codes are wrong:
Code:
nextprime(x): finds the smallest pseudoprime (see ispseudoprime) greater than or equal to x. And http://www.research.att.com/~njas/sequences/A055211 for the other sequence. |
|
|
|
|
|
#13 |
|
(loop (#_fork))
Feb 2006
Cambridge, England
23·11·73 Posts |
isprime() does APRCL tests (as you can tell by running it after doing setdefault(debug,3)); runtime in the up-to-kilodigit range on K8/2200 is fit quite nicely by
10 nanoseconds * (number of digits) ^ 3.63 which suggests (extrapolating horribly) that 6k digits would take about a week on such a system. Better than I'd thought. I'd install 64-bit Linux rather than trying to compile pari-gp on Vista x64, but this may just be my prejudices showing. There's no point trying to optimise the search code, the isprime() will take the dragon's share (larger than a lion ...) of the time. Last fiddled with by fivemack on 2009-01-27 at 12:38 |
|
|
|
|
|
#14 |
|
Oct 2007
Manchester, UK
23·59 Posts |
|
|
|
|
|
|
#15 | |
|
Sep 2004
13·41 Posts |
Quote:
The problem with installing linux is I use this machine for other stuff like school. Maybe in the summer, or I can try messing with dual partition or a live CD or something, but it seems this code is likely to take a month at least. Do you think it would be reasonable to do this distributed? Or computing the bases take too much duplicate time? It seems the primorials are definetely not the limiting factor here. Last fiddled with by Joshua2 on 2009-01-27 at 15:51 |
|
|
|
|
|
|
#16 |
|
Oct 2007
Manchester, UK
23·59 Posts |
This could easily be broken up into a distributed project, as testing each term is completely independant of other terms. It takes almost no time at all to calculate the primorial function up to very high levels, in fact I just ran this code to see the iterations where the primorial function has grown by another 1000 digits:
Code:
P=1;
k=0;
x=1;
forprime(a=2,500000,
P*=a;
k++;
d=ceil(log(P)/log(10));
if(d>=x*1000,
print("iter\t= ",k,"\nprime\t= ",a,"\ndigits\t= ",d,"\n");
x++
);
if(d>=20000,
break()
)
);
The first output from it is: Code:
iter = 350 prime = 2357 digits = 1000 q-P=3133 for the 350th iteration, which agrees with this table. For distribution, perhaps run the project in two stages, the first being calculating values using nextprime only (which would have to be uploaded), the second checking that the output of nextprime is in fact prime. If you ran both projects at the same time, the folks with faster computers could verify with isprime, and the slower computers could advance the list of tentatively fortunate numbers. I doubt that even distributed, the isprime() side would get much past (or even to) the thousandth iteration though. |
|
|
|
|
|
#17 |
|
Sep 2004
13×41 Posts |
How do you make pari log the probable primes?
|
|
|
|
|
|
#18 |
|
Aug 2006
3×1,993 Posts |
|
|
|
|
|
|
#20 |
|
Aug 2006
3·1,993 Posts |
Maybe I just don't understand it, but as I read it there are lots of counterexamples. Sampler:
5083 - 7! = 43 43 is prime 43 < 7^2 5083 = 13 * 17 * 23 ---- 17 + 7! = 5057 17 is prime 17 < 7^2 5057 = 13 * 389 ---- 5043 - 7! = 3 3 is prime 3 < 7^2 5043 = 3 * 41^2 Last fiddled with by CRGreathouse on 2009-01-27 at 19:18 |
|
|
|
|
|
#21 |
|
Sep 2004
10258 Posts |
So your saying that you don't think that proof is valid. You haven't found any errors with my q-kPrimorial(n) is prime (or the first couple on a few can be 9) have you?
|
|
|
|
|
|
#22 | |
|
Oct 2007
Manchester, UK
23×59 Posts |
Quote:
Code:
write("C:/trip/probprime.txt","probprime=",q,";");
|
|
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Let's attack the Bayesian-ECM-bounds again | fivemack | Math | 34 | 2021-08-05 10:55 |
| Nuke attack - run or hide? | MooMoo2 | Soap Box | 40 | 2018-01-19 23:48 |
| TF: A job half done? | davieddy | Lounge | 35 | 2010-10-01 20:18 |
| Attack of the Cosmic Rays | S485122 | Hardware | 3 | 2010-08-24 01:19 |
| Attack of the Killer Zombies | ewmayer | Lounge | 12 | 2007-01-30 05:56 |