mersenneforum.org  

Go Back   mersenneforum.org > Math Stuff > Computer Science & Computational Number Theory > PARI/GP

Reply
 
Thread Tools
Old 2010-08-23, 21:54   #782
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

69016 Posts
Default

Okay. So you are busy accounting for the vector portion of the project?

It begins: (My idea):

knfacsieve(a, b, c, d, pmax) = {
for(n=a, b,
forprime(p=2,pmax,...

Last fiddled with by 3.14159 on 2010-08-23 at 21:57
3.14159 is offline   Reply With Quote
Old 2010-08-23, 21:57   #783
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

69016 Posts
Default

I just can't finish it up. I think what I posted above is simply going to repeat the forprime loop n times.

Last fiddled with by 3.14159 on 2010-08-23 at 21:58
3.14159 is offline   Reply With Quote
Old 2010-08-23, 22:01   #784
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24·3·5·7 Posts
Default

I think I have the appropriate idea at hand about what the sieve is supposed to do, but am unable to write the script to make it work.

Last fiddled with by 3.14159 on 2010-08-23 at 22:01
3.14159 is offline   Reply With Quote
Old 2010-08-23, 22:07   #785
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

100000110000002 Posts
Default

what is it in basic terms I could look up easily I'll try.
science_man_88 is offline   Reply With Quote
Old 2010-08-23, 22:09   #786
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

32208 Posts
Default

Quote:
Originally Posted by science_man_88
what is it in basic terms I could look up easily I'll try.
It is a sieve that kicks out bad k-values for numbers of the form k * b!n + 1 which are divisible by small primes, where the user is allowed to choose the k-range, the factorial base and the exponent, as well as the largest prime it will sieve up to. The output will be written to a file for testing. The user will have to make the modifications to ensure that the range will be testable, preferably with a decent or advanced text editor that is capable of doing so.

Last fiddled with by 3.14159 on 2010-08-23 at 22:14
3.14159 is offline   Reply With Quote
Old 2010-08-23, 22:15   #787
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24×3×5×7 Posts
Default

Where k < b!n, and where k, b, and n are positive integers.
3.14159 is offline   Reply With Quote
Old 2010-08-23, 22:16   #788
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24×3×5×7 Posts
Default

That's pretty much what I plan to do. NewPGen will not accept any base larger than 10 digits, apparently. Hopefully it can be done.

Last fiddled with by 3.14159 on 2010-08-23 at 22:18
3.14159 is offline   Reply With Quote
Old 2010-08-23, 22:18   #789
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

110100100002 Posts
Default

I will then compare this to a script that trial-divides each candidate to 1048576, which is rather easy to construct. (Or 220)

Last fiddled with by 3.14159 on 2010-08-23 at 22:20
3.14159 is offline   Reply With Quote
Old 2010-08-23, 22:30   #790
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24×3×5×7 Posts
Default

Here's an example for k * 19!6 + 1:
Code:
factor is 241
factor is 579637
factor is 710341
factor is 31249
factor is 67
factor is 169937
factor is 47
factor is 20269
factor is 489449
factor is 43
factor is 643
factor is 3907
factor is 2897
factor is 35993
factor is 103
factor is 613
factor is 733
factor is 23
factor is 919
factor is 2659
factor is 32377
factor is 324529
factor is 3677
factor is 1303
factor is 3583
factor is 18959
factor is 1005427
factor is 164621
factor is 1949
factor is 104479
factor is 31
factor is 101
factor is 29
factor is 41
factor is 14281
factor is 223
factor is 37
factor is 829
factor is 1039
factor is 1030951
factor is 271
factor is 373
factor is 1289
factor is 47041
factor is 318403
factor is 449
factor is 233
factor is 699649
factor is 711793
factor is 23
factor is 5827
factor is 1471
factor is 53
factor is 191
factor is 349
factor is 41177
factor is 157
factor is 947
factor is 61
factor is 50591
factor is 59
factor is 239
factor is 142169
factor is 113
factor is 42443
factor is 172801
factor is 97
factor is 197
factor is 1721
factor is 43
factor is 1217
factor is 47
factor is 21179
factor is 383
factor is 29
factor is 31
factor is 599
factor is 23
factor is 83
factor is 797
factor is 21169
factor is 33829
factor is 1327
factor is 79
factor is 229
factor is 937
factor is 6883
factor is 37
factor is 73
factor is 1663
factor is 41
factor is 863
factor is 6121
factor is 165047
factor is 181
factor is 1277
factor is 167
factor is 751
factor is 26669
factor is 193
factor is 67
factor is 71
factor is 151
factor is 433
factor is 3271
factor is 461
factor is 139
factor is 1579
factor is 137
factor is 335077
factor is 13441
factor is 23
factor is 18307
factor is 89
factor is 577
factor is 109
factor is 199
factor is 7417
factor is 29
factor is 263
factor is 31
factor is 7333
factor is 571
factor is 117937
factor is 311
factor is 53
factor is 1259
factor is 329717
factor is 71663
factor is 63709
factor is 43
factor is 5683
factor is 127
factor is 65957
factor is 311713
factor is 10091
factor is 107
factor is 47
factor is 163
factor is 37
factor is 59
factor is 61
factor is 17497
factor is 224633
factor is 23
factor is 563
factor is 41
factor is 10939
factor is 397
factor is 4153
factor is 2843
factor is 29
factor is 5821
factor is 103
factor is 659
factor is 859
factor is 331
factor is 4079
factor is 873139
factor is 31
factor is 10909
factor is 1571
factor is 207113
factor is 131
factor is 149
factor is 293
factor is 929
factor is 5281
factor is 22973
factor is 101
factor is 421
factor is 23
factor is 194609
factor is 4243
factor is 457
factor is 6659
factor is 89983
factor is 209203
factor is 4951
factor is 4423
factor is 14629
factor is 11131
factor is 43
factor is 67
factor is 73
factor is 37
factor is 1013
factor is 34721
factor is 131711
factor is 21767
factor is 110479
factor is 79
factor is 29
factor is 71
factor is 83
factor is 251
factor is 1613
factor is 14549
factor is 25933
factor is 53
factor is 479
factor is 12347
factor is 52529
3.14159 is offline   Reply With Quote
Old 2010-08-23, 22:30   #791
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Code:
sievex(kmin,kmax,b,n,pmax)= for(k=kmin,kmax,forprime(p=1,pmax,if((k*b!^n+1)%p==0,,print("no factor found under "pmax" for "k"*"b"!^"n"+1"))))
best i could do i know it prints a lot I messed something up but it what I could do.
science_man_88 is offline   Reply With Quote
Old 2010-08-23, 22:33   #792
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

I know what I messed up now it's that I didn't check that all factors were checked for each.

Last fiddled with by science_man_88 on 2010-08-23 at 22:35
science_man_88 is offline   Reply With Quote
Reply



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

All times are UTC. The time now is 23:07.


Fri Aug 6 23:07:27 UTC 2021 up 14 days, 17:36, 1 user, load averages: 3.82, 3.85, 3.90

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.