tony . reix on Sat, 16 Nov 2024 12:32:48 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: PARI/GP timings for operations on biggest known 41,024,320 decimal digit prime


Hi Hermann,

Reading your email on my phone, that looks interesting. However, I'll need to read it on my PC then.

BTW, do you know that Mersenne numbers can also be written as:
   M_q=(8x)^2-(3qy)^2
?
Once if M_q is prime (and x & y are obvious). Several times if M_q is composite (and x & y are not obvious at all).

 
Experimenting quickly with Wolfram Alpha, it seems that the Mersenne primes are:
      M_q = 4x^2+3y^2
and often:
      M_q = 4x^2+27y^2 .

Do you have a link to a paper clarifying the property of M_q as x^2+3y^2 ?

Do you see for M_52 than x is even and y is a multiple of 3 ?

Thx

Tony
De : hermann@stamm-wilbrandt.de
A : pari-users@pari.math.u-bordeaux.fr
Envoyé: vendredi 15 Novembre 2024 21:29
Objet : Re: PARI/GP timings for operations on biggest known 41,024,320 decimal digit prime
 
Recently new biggest known prime (41,024,320 decimal digits) M_52 was
found.

It turned out that for all Mersenne primes but M_1, -3 is a quadratic
residue.
Therefore there are integers x,y with M_52=x^2+3*y^2.

The whole computation took 8.01 days with 1580% CPU (AMD 7950X) LLR
software
(patched to write out "sqrt(Mod(-3,p))") based on gwnum library:
https://gist.github.com/Hermann-SW/1aa0859f90bf2423b0d0a2ebc7f3eb2c

Computation of x,y from sqrt(Mod(-3,p)) took 17 seconds with:
[M,V]=halfgcd(lift(s),p);

Leftmost 60 characters of gist GP script:

hermann@7950x:~/llr405src/linux64llr$ cut -b-60
M_52.is.x^2_plus_3_times_y^2.gp
p=2^136279841-1;
##
x=4624919986798384683510429678492757870361922596523736044043
##
y=-471803447302992039086168784360506296339127284694422433463
##
p==x^2+3*y^2
##
hermann@7950x:~/llr405src/linux64llr$


Computing p is fast (6ms), storing (20MB) numbers into variables x,y
takes
1.1 seconds each, validation of equation takes 357ms only:

hermann@7950x:~/llr405src/linux64llr$ gp -q <
M_52.is.x^2_plus_3_times_y^2.gp
*** last result computed in 6 ms.
*** last result computed in 1,106 ms.
*** last result computed in 1,051 ms.
1
*** last result computed in 357 ms.
hermann@7950x:~/llr405src/linux64llr$


Regards,

Hermann.