![]() |
![]() |
#870 | |
"Sander"
Oct 2002
52.345322,5.52471
29·41 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#871 | |
Feb 2005
111111002 Posts |
![]() Quote:
Before each factoring, the scripts check if the number still does not have FF status to avoid repeating job already completed by someone else. Simple perl script does the job. Actually, I run six such scripts concurrently. Last fiddled with by maxal on 2010-09-20 at 13:04 |
|
![]() |
![]() |
![]() |
#872 |
Feb 2005
22×32×7 Posts |
![]()
btw, does factordb.com support cyclotomic polynomials?
I've tried notation Phi(n,x) (adopted in ECM) but there was no luck. |
![]() |
![]() |
![]() |
#873 |
A Sunny Moo
Aug 2007
USA (GMT-5)
11000011010012 Posts |
![]()
Are you doing ECM on these prior to QSing them? From what I've seen, many of the numbers on the list can be easily knocked out in the first couple of rounds of the "scan" button.
|
![]() |
![]() |
![]() |
#874 |
Feb 2005
22×32×7 Posts |
![]() |
![]() |
![]() |
![]() |
#875 |
Mar 2007
Germany
23·3·11 Posts |
![]()
Can you please post you Perl Program?
|
![]() |
![]() |
![]() |
#876 |
Aug 2006
175416 Posts |
![]()
I wonder what the optimal amount of ECM is for these numbers. msieve does 30 curves at B1 = 2000 if I read the source correctly, plus a good number of P-1 and P+1 tests.
|
![]() |
![]() |
![]() |
#877 |
Feb 2005
22×32×7 Posts |
![]()
Here is my script.
Please notice that I did not mean to make it comprehensive or fault-tolerant. Don't blame me if it occasionally resulted in DDoS of factordb.com or something. ![]() Also, the script highly depends on the current format of data received from factordb.com. Any changes in this format may break the script functionality. So, use it with caution on your own risk and periodically monitor its activity. Currently it uses msieve for factoring and wget for communicating with factordb.com You need to specify full path and executable names of these programs in the header. Multiple instances of the script must be run from different directories. Code:
#!/usr/bin/perl use strict; print("FactorDB Helper 1.2\n"); # wget executable my $wget = "wget --no-check-certificate"; # msieve executable my $msieve = "/home/maxal/libs/msieve/msieve/trunk/msieve -t 3"; $| = 1; $/ = undef; while(1) { my @todo; # getting 100 smallest unfactored numbers $_ = `$wget -O - http://factordb.com/listtype.php?t=3`; # however, it may be a good idea to get the second hundred #$_ = `$wget -O - http://factordb.com/listtype.php?t=3&start=100`; while( /<a href=\"index\.php\?id=([^\"]*)\"><font color=\"\#002099\">([^<]*)<\/font><\/a><sub><(\d+)><\/sub>/gs ) { my $id = $1; my $digits = $3; if( $digits >= 65 ) { push(@todo,$id); } } if( scalar(@todo) == 0 ) { print("No suitable numbers. Resting for a while.\n"); sleep 60; next; } #shuffle todo shuffle(@todo); print("Todo size: ",scalar(@todo),"\n"); foreach (@todo) { my $id = $_; # checking status, just in case $_ = `$wget -O - http://factordb.com/index.php?id=$id`; if( /<td>FF<\/td>/ ) { print("\nid=$id is already factored.\n\n"); next; } # getting number in decimal $_ = `$wget -O - http://factordb.com/index.php?showid=$id`; if( ! /<td align=\"center\">(\d+)<br>/gs ) { print("Error 1\n"); sleep 60; next; } my $number = $1; my $digits = length($number); print("Factoring $digits-digit number (id=$id)\n"); if( $digits >= 80 ) { $_ = `$msieve -v -n $number`; } else { $_ = `$msieve -v $number`; } if( /prp\d+ factor: (\d+)\s/s ) { my $factor = $1; print("\nFactor found: $factor\n\n"); $_ = `$wget --post-data "report=$factor&format=0" -O - http://factordb.com/index.php?id=$id`; } else { print("Error 2\n"); sleep 60; } } } exit; sub shuffle { for (my $i = 0; $i < @_; $i++) { my $j = rand(@_ - $i) + $i; # pick random element ($_[$i], $_[$j]) = ($_[$j], $_[$i]); # swap 'em } } Last fiddled with by maxal on 2010-09-20 at 17:45 |
![]() |
![]() |
![]() |
#878 |
Sep 2008
Krefeld, Germany
2·5·23 Posts |
![]()
Nice script!
I added a new parameter to listtype.php - perpage. If you want you can display more or less than 100 per page now. Limit is 1000. Another one: &scriptmode=1 Displays just the internal id's + the number of digits, seperated by a space. One id per line. This is a lot faster than retrieving all the other information from the database. And the last one: getrandom.php Parameters: n: number of numbers [1..100], 1 default t: type. 2=> Unknown, 3=> Composite, default: Probable prime mindig: minimum number of digits [40..?] , 65 default returns the same format as listtype.php with scriptmode enabled. Maybe these are useful to you :-) Last fiddled with by Syd on 2010-09-20 at 20:35 |
![]() |
![]() |
![]() |
#879 |
Apr 2010
Over the rainbow
32×281 Posts |
![]()
to adapt the script for windows machine, just change the 3 first line to
Code:
#!H:\strawbery\perl <---- where you have installed perl use strict; print("FactorDB Helper 1.2\n"); # wget executable my $wget = "H:/Docume~1/Vincent/Bureau/script/wget --no-check-certificate"; <--- where you have wget # msieve executable my $msieve = "H:/Docume~1/Vincent/Bureau/script/msieve147 -t 3"; <---- where you have msieve with Code:
H:\strawberry\perl\bin\perl.exe "H:\Documents and Settings\Vincent\Bureau\script\script.pl" <-- where your script is Last fiddled with by firejuggler on 2010-09-20 at 21:04 |
![]() |
![]() |
![]() |
#880 | |
Feb 2005
22·32·7 Posts |
![]() Quote:
But n=100 seems to produce only a couple of dozens id's ;( Also, parameter maxdig would be helpful to avoid factorization of monsters. On a different topic, could you please add support for cyclotomic polynomials (similarly to Phi() in ecm) ? Last fiddled with by maxal on 2010-09-20 at 21:27 |
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Database for k-b-b's: | 3.14159 | Miscellaneous Math | 325 | 2016-04-09 17:45 |
Factoring database issues | Mini-Geek | Factoring | 5 | 2009-07-01 11:51 |
database.zip | HiddenWarrior | Data | 1 | 2004-03-29 03:53 |
Database layout | Prime95 | PrimeNet | 1 | 2003-01-18 00:49 |
Is there a performance database? | Joe O | Lounge | 35 | 2002-09-06 20:19 |