Hi,
I'm solving this challenge at the moment. For those who want to try it, I got some info:
This 547-digit number is not the largest prime in the sequence, but it is a prime:
Code: Select all
141592653589793238462643383279502884197169399375105820974944592307816406
28620899862803482534211706798214808651328230664709384460955058223172535940812
84811174502841027019385211055596446229489549303819644288109756659334461284756
48233786783165271201909145648566923460348610454326648213393607260249141273724
58700660631558817488152092096282925409171536436789259036001133053054882046652
13841469519415116094330572703657595919530921861173819326117931051185480744623
79962749567351885752724891227938183011949129833673362440656643086021394946395
2247371907021
You can verify this within seconds if you got the right algortihm.
ECM can factorize a composite number for you.
You might also want to make damn sure that your program prints the prime every time it finds one. I ran my program for hours just to see that I forgot this little part ...
edit 2: and make sure you write the output to a file! I simply printed the output, ran my Python-script in the bash and gave too much ouput. The result was, that I could not read the last prime, but lots of irrelevant output :-/
Ah, and if you want to count the length of your prime you can use
charcounter (I guess that those, who are able to solve this challenge can make a charcounter by their own, but it looks so good)
I've found a prime with 1140 characters, but the Website doesn't respond to it. Am I doing something wrong?
edit: Now I've found a prime with much more than 1,500 digits (I don't want to give a spoiler, so I don't give the exact number). Nothing happens when I send this digit with Chrome or Firefox to the server - neither a "correct answer"-message, nor a "'123' is incorrect."-message
It seems like it would only accept messeges up to a size of 513 characters, 514 characters are not accepted.
Try this (font size 2, I don't want to screw up the page layout):
87654321222222222222222221222222222222222222222222222222222222222222222222222222222221122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222211111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
Then add, lets say a 9 as first digit. No feedback.
Here are my headers:
Code: Select all
Request URL:http://www.hacker.org/challenge/chal.php?answer=YourLongPrime&id=99&go=Submit
Request Method:GET
Status Code:200 OK
Request Headers
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4
Connection:keep-alive
Cookie:MyCookies
Host:www.hacker.org
User-Agent:Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.124 Safari/534.30
Query String Parameters
answer:YourLongPrime
id:99
go:Submit
Response Headers
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:Keep-Alive
Content-Encoding:gzip
Content-Length:789
Content-Type:text/html
Date:Sun, 17 Jul 2011 11:09:13 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:timeout=2, max=100
Pragma:no-cache
Server:Apache
Vary:Accept-Encoding