![]() |
|
|
#133 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
Quote:
|
|
|
|
|
|
|
#134 |
|
Aug 2006
3×1,993 Posts |
|
|
|
|
|
|
#135 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
|
|
|
|
|
|
#136 | |
|
May 2010
Prime hunting commission.
32208 Posts |
Quote:
I somehow construed the Fermat test so that 11 is now occasionally marked off as a composite. Well, a * b = 11. a =?; b = ? Ideas: a = 5.5, b = 2. Resolved: Set base to 2. Last fiddled with by 3.14159 on 2010-07-22 at 16:08 |
|
|
|
|
|
|
#137 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
t=0;forstep(n=2,400000,[2],forprime(p=2,n/2,t+=isprime(n-p);if(t>0,break())))
this is a alteration of your quick code and performs to 400,000 in (94 ms I think is what i got) the other code took 1907 for a one time test if I looked up my stats properly. so that's about 2000% as fast. the limitation is the precomputed primes here though. I love this i tested repeatedly at 100,000 and 1,000,000 and the 100,000 always got 93-94 ms the 1000000 went as low as 891 and never to 940 so in the linear to sub-linear range(I say this because 94 overwhelmed 93 in the 100,000 test) and technically if we get around the precomputed prime thing in under about 1900% the time it takes now we can still have it faster than the other one. Last fiddled with by science_man_88 on 2010-07-22 at 16:58 |
|
|
|
|
|
#138 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
Quote:
or maybe put a for loop around it to test one base at a time up to the given limit. Last fiddled with by science_man_88 on 2010-07-22 at 16:29 |
|
|
|
|
|
|
#139 | |
|
May 2010
Prime hunting commission.
110100100002 Posts |
Quote:
Last fiddled with by 3.14159 on 2010-07-22 at 16:57 |
|
|
|
|
|
|
#140 |
|
May 2010
Prime hunting commission.
168010 Posts |
Also: If 6n+1, 12n+1, and 18n+1 are prime, (6n+1)(12n+1)(18n+1) = Carmichael number.
My best guess: (6n+1)(12n+1) = 72n^2 + 6n + 12n + 1 = 72n^2 + 18n + 1 (18n+1)(72n^2 + 18n + 1) = 1296n^3 + 72n^2 + 324n^2 + 18n + 18n + 1 That = 1296n^3 + 396n^2 + 36n + 1 Code!: Code:
for(n=10^3,3*10^3,(1296n^3 + 396n^2 + 36n + 1),if(numdiv(1296n^3 + 396n^2 + 36n + 1) == 8,print(n)) Code:
b(n) = {
for(n=10^3,3*10^3,(1296n^3 + 396n^2 + 36n + 1,
if(numdiv(1296n^3 + 396n^2 + 36n + 1) == 8,print(n)))
);
}
Code:
(13:20) gp > b(n) = {
for(n = 10^3, 3*10^3,(1296*n^3 + 396*n^2 + 36*n + 1,
if(numdiv(1296*n^3 + 396*n^2 + 36*n + 1) == 8, print(n)));
}
Code:
*** syntax error, unexpected ')', expecting KPARROW or ',': ...*n^2+36*n+1)==8,print(n))); Last fiddled with by 3.14159 on 2010-07-22 at 17:23 |
|
|
|
|
|
#141 |
|
"Forget I exist"
Jul 2009
Dumbassville
20C016 Posts |
Code:
b(n)=for(n=10^3,3*10^3,if(numdiv(1296*n^3+396*n^2+36*n+1)==8,print(n))); Last fiddled with by science_man_88 on 2010-07-22 at 17:42 |
|
|
|
|
|
#142 | |
|
May 2010
Prime hunting commission.
24·3·5·7 Posts |
Quote:
Last fiddled with by 3.14159 on 2010-07-22 at 17:45 |
|
|
|
|
|
|
#143 | |
|
Aug 2006
3×1,993 Posts |
Quote:
|
|
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Goldbach Conjecture | MattcAnderson | MattcAnderson | 4 | 2021-04-04 19:21 |
| Factorial and Goldbach conjecture. | MisterBitcoin | MisterBitcoin | 17 | 2018-01-29 00:50 |
| Goldbach's weak conjecture | MattcAnderson | MattcAnderson | 19 | 2017-03-21 18:17 |
| Goldbach's conjecture | Citrix | Puzzles | 3 | 2005-09-09 13:58 |