mersenneforum.org Automatically updating factordb
 Register FAQ Search Today's Posts Mark Forums Read

 2012-03-26, 19:15 #1 chris2be8     Sep 2009 5·389 Posts Automatically updating factordb Hello, I'm using SNFS to factor some of the smaller composites in factordb. I'm using code copied from firejuggler's yafu.pl script from http://mersenneforum.org/showthread.php?t=16359&page=3 post 65. But it only seems to work about half the time. An example failure is when I generate the url: http://factorization.ath.cx/report.php?report=(10^110*4513+883)/9985751%3D67180229841217849970082301271*672733594449015022926507086465812106323889333502525331018102445134797068313923 I can't see any difference between requests that work and those that fail. Should I update my script to try again a few times if the update fails? Or is there a more robust technique? Chris K
 2012-03-28, 02:52 #2 RichD     Sep 2008 Kansas 2·7·227 Posts I ran into a length problem so I changed it to two inquiries. Given your example I would fetch the internal ID first by: Code: http://factordb.com/index.php?query=%2810%5E110*4513+883%29%2F9985751 Parse the html source to get the ID of the form 1100000000456380365 (19-digit) number then report a single factor with wget. Code: wget -q -O /dev/null --post-data="report=67180229841217849970082301271&format=0" http://factordb.com/index.php?id=1100000000456380365 The remaining factor will be computed by the DB. No need to send it. This may not be the best way to report it but it works for me.
2012-03-29, 10:27   #3
VolMike

Jun 2007
Moscow,Russia

7·19 Posts

Quote:
 Originally Posted by chris2be8 Hello, I'm using SNFS to factor some of the smaller composites in factordb. I'm using code copied from firejuggler's yafu.pl script from http://mersenneforum.org/showthread.php?t=16359&page=3 post 65. But it only seems to work about half the time. An example failure is when I generate the url: http://factorization.ath.cx/report.php?report=(10^110*4513+883)/9985751%3D67180229841217849970082301271*672733594449015022926507086465812106323889333502525331018102445134797068313923 I can't see any difference between requests that work and those that fail. Should I update my script to try again a few times if the update fails? Or is there a more robust technique? Chris K
Some string patterns of factorization number should be replaced for compatability with factrodb.com requests syntax. Replacement rules are shown below in "a" -> "b" form:

Code:
                "%" -> "%25"
"!"   -> "%21"
"+"  -> "%2B"
"("   -> "%28"
")"   -> "%29"
"/"   -> "%2F"
"^"  -> "%5E"
"#"  ->  "%23"
These patterns have been found by me due the experiments with url requests.

The attach below is modified version of yoyo perl script (http://www.rechenkraft.net/wiki/inde...:Yoyo/factordb), which is used to factor numbers from input file by yafu and post results to factordb. This script can handle numbers with any patterns shown above. You need yafu binary and yafu.in with numbers in the same folder with attach.
factor_in.zip

Last fiddled with by VolMike on 2012-03-29 at 10:29

 2012-03-29, 18:48 #4 chris2be8     Sep 2009 5·389 Posts Thanks VolMike, that looks to have fixed it. 5 results so far after adding it to my script, all OK. I've also got code to write an error report if I don't get either a "Factor added" or "Factor already known" in the response. That will catch other issues such as my internet connection failing. Chris K
2012-03-29, 19:35   #5
Dubslow

"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3·2,399 Posts

Quote:
 Originally Posted by VolMike These patterns have been found by me due the experiments with url requests.
HTTP requests are limited to the ASCII character set, and characters with special meaning must also be encoded.

http://www.blooberry.com/indexdot/ht...rlencoding.htm

Last fiddled with by Dubslow on 2012-03-29 at 19:35 Reason: and characters with special meaning must also be encoded.

 2012-03-31, 16:23 #6 chris2be8     Sep 2009 36318 Posts I've had another look, now I know what to look for I can see that it didn't like a + in the url. Every attempt with a + in it failed, all but 1 of the rest worked (I think the exception was the router rebooting itself at the wrong moment). With the + encoded they all work. Chris
 2012-03-31, 18:20 #7 RichD     Sep 2008 Kansas 2×7×227 Posts Sorry, that was my mistake above for misleading you with the + sign. Thanks to VolMike for pointing that out - and the other symbols. I've been doing some work with OPN and it never has a plus sign in any of the expressions. (Now back to correcting my program should one day I need it for a + sign.)
 2012-05-01, 17:27 #8 chris2be8     Sep 2009 5·389 Posts Does anyone have any perl code I could "borrow" to query factordb to see if a given number is factored? I'm finding quite a lot of the small composites I'm working on have been factored by someone else when I submit the factors. A check just before I start work should save wasted effort. I could probably write some myself, but it will take time I'm short of. Chris
 2012-05-01, 18:39 #9 Stargate38     "Daniel Jackson" May 2011 14285714285714285714 613 Posts Any number <65 digits is automatically factored by the DB.
2012-05-03, 10:20   #10
yoyo

Oct 2006
Berlin, Germany

59110 Posts

Quote:
 Originally Posted by chris2be8 Does anyone have any perl code I could "borrow" to query factordb to see if a given number is factored? I'm finding quite a lot of the small composites I'm working on have been factored by someone else when I submit the factors. A check just before I start work should save wasted effort. I could probably write some myself, but it will take time I'm short of. Chris
Start with this http://www.rechenkraft.net/wiki/inde...ctordb#yafu.pl. It fetches a small composite from factorDB, runs yafu with it and reports it back. This and the randomness which is used should avoid that you waste to much effort.

yoyo

 Similar Threads Thread Thread Starter Forum Replies Last Post nobody Information & Answers 3 2012-04-26 14:31 bchaffin Aliquot Sequences 6 2011-06-23 17:36 Nestea80 Information & Answers 3 2008-12-04 16:47 xavion NFSNET Discussion 1 2003-10-12 04:32 SatishM Software 4 2003-04-05 16:08

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

Sun Nov 29 05:09:39 UTC 2020 up 80 days, 2:20, 3 users, load averages: 2.27, 2.00, 1.71