Quote:
Originally Posted by kruoli
- Run Prime95/mprime with Pminus1=1,2,{exponent},-1,{B1},0.
- Now, a save file exists m{zero padded exponent}.
- Open the file in a Hex Editor.
- Remove the first 88 bytes.
- Reverse all bytes.
- Copy the hexadecimal representation.
- Remove leading zeros.
- Convert this to lower case.
- Create a new file with this content:
Code:
METHOD=P-1; B1={B1}; N=2^{exponent}-1; X=0x{modified hex data from the last step}; CHECKSUM=0; PROGRAM=; Y=0x0; X0=0x3; Y0=0x0; WHO=; TIME=;
- ...
|
Thanks a LOT! Since I'm lazy, I automated steps II and III with some Python (version 3.6 or higher) code:
Code:
# fill in these 3 values:
b1 = 1000000
exponent = 5273
known_factors = [38134337, 10372530354079, 105636369464519254639]
input_file = "m{:07}".format(exponent)
if known_factors:
known_factors = "/" + "/".join(map(str, known_factors))
else:
known_factors = ""
with open(input_file, "rb") as f:
data = reversed(f.read()[88:])
hex_codes = "".join(map("{:02x}".format, data))
line = "METHOD=P-1; B1={}; N=(2^{}-1){}; X=0x{}; CHECKSUM=0; PROGRAM=; Y=0x0; X0=0x3; Y0=0x0; WHO=; TIME=;".format(
b1, exponent, known_factors, hex_codes
)
print(line)
This even works with known factors: In my test run with
M5273 I found the missing 26 digit factor via gmp-ecm.