Talk:Lucas-Lehmer test: Difference between revisions

→‎Math in introduction: deleted (done, no need to discuss)
(→‎Math in introduction: note about viewer-dependency)
(→‎Math in introduction: deleted (done, no need to discuss))
Line 327:
 
The Java version is still limited by types. Integer.parseInt(args[0]) limits p to 2147483647. Also the fact that isMersennePrime takes an int limits it there too. For full arbitrary precision every int needs to be a BigInteger or BigDecimal and a square root method will need to be created for them. The limitation is OK I think (I don't think we'll be getting up to 2<sup>2147483647</sup> - 1 anytime soon), but the claim "any arbitrary prime" is false because of the use of ints. --[[User:Mwn3d|Mwn3d]] 07:45, 21 February 2008 (MST)
 
==Math in introduction==
 
Here is the page's introduction written with math markup and so proper superscripts; but tex support is currently broken (at least for my [[Special:Preferences#prefsection-2|viewing preferences]]), so I haven't put it in yet. Once fixed, copy it in (without the indent). --[[User:Kevin Reid|Kevin Reid]] 17:15, 28 July 2009 (UTC)
 
: Lucas-Lehmer Test: for <math>p</math> a prime, the Mersenne number <math>2^p-1</math> is prime if and only if <math>2^p-1</math> divides <math>S(p-1)</math> where <math>S(n+1)=S(n)^2-2</math>, and <math>S(1)=4</math>.