mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   PARI/GP (https://www.mersenneforum.org/forumdisplay.php?f=155)
-   -   PARI's commands (https://www.mersenneforum.org/showthread.php?t=13636)

3.14159 2010-08-23 21:54

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,...

3.14159 2010-08-23 21:57

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

3.14159 2010-08-23 22:01

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.

science_man_88 2010-08-23 22:07

what is it in basic terms I could look up easily I'll try.

3.14159 2010-08-23 22:09

[QUOTE=science_man_88]what is it in basic terms I could look up easily I'll try.
[/QUOTE]

It is a sieve that kicks out bad k-values for numbers of the form k * b![sup]n[/sup] + 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.

3.14159 2010-08-23 22:15

Where k < b![sup]n[/sup], and where k, b, and n are positive integers.

3.14159 2010-08-23 22:16

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.

3.14159 2010-08-23 22:18

I will then compare this to a script that trial-divides each candidate to 1048576, which is rather easy to construct. (Or 2[sup]20[/sup])

3.14159 2010-08-23 22:30

Here's an example for k * 19![sup]6[/sup] + 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[/code]

science_man_88 2010-08-23 22:30

[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"))))[/CODE]

best i could do i know it prints a lot I messed something up but it what I could do.

science_man_88 2010-08-23 22:33

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


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

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