mersenneforum.org Final Lucas Lehmer residuals and Pythagorean triples
 Register FAQ Search Today's Posts Mark Forums Read

 2017-12-17, 18:15 #1 a nicol   Nov 2016 111012 Posts Final Lucas Lehmer residuals and Pythagorean triples Bas Jansen's phd paper has a table of Lehmer symbols: https://www.math.leidenuniv.nl/scripties/PhDJansen.pdf (4,q) [5(+),7(-),13(+),17(-),19(-),31(+),61(+),89(-),107(-),127(+),521(-)] (10,q) [5(-),7(-),13(-),17(+),19(+),31(+),61(+),89(+),107(+),127(+),521(+)] The rows represent the sign table of the Lehmer symbols. The first row is formed from the residuals of a LL sequence with a starting value of 4. The second row is a starting value of 10. I've clipped and attached a proper definition of the Lehmer symbol below (Lehmer symbols are the major subject of the phd). Pythagorean triples and Lucas Lehmer residuals Using the Mersenne primes as an example: Calculate the second to last residual from a LL sequence with a starting value of 4: [8,111,128,130559,523263,65536,2147483648,618970019642654953077473279,162259276829213345377179500806143,18446744073709551616,...] In binary: [0b1000,0b1101111,0b10000000,0b11111110111111111,0b1111111101111111111,0b10000000000000000,...] Taking those residuals with a (-) Lehmer symbol: Exponents: [7,17,19,89,107,521,607,1279,2281,3217,4423,9689,11213...] Residuals(s): [111,130559,523263,618970019642654953077473279,162259276829213345377179500806143,...] I noticed these residuals seem to be one and two less than b and c in a Pythagorean triple, as in: a1 = sqrt(c1^2-b1^2) = sqrt(113^2-112^2) = 15.0 b1 = s+1 c1 = s+2 Triples: [15,112,113],[511,130560,130561],[1023,523264,523265],[35184372088831,618970019642654953077473280,618970019642654953077473281]... In the LL test, the second to last residual is squared, then 2 is subtracted. This number is then reduced modulo the Mersenne number and the modulo returns 0 if the test finds a prime, as in: 12319 mod 2^7-1 = 0 In the case of negative Lehmer symbols, this squaring also generates the b value of another Pythagorean triple: a2 = 2*a1*b1 = 2*15*112 = 3360 b2 = (b1-a1)*(b1+a1) = (112-15)*(112+15) = s^2-2 = 111^2-2 = 12319 c2 = c1^2 = 113^2 = 12769 sqrt(12769^2 - 12319^2) = 3360.0 Triples: [3360,12319,12769],[133432320,17045652479,17046174721],[1070598144,273804167167,273806260225]... I've tested up to 2^11213-1 and all those listed above have a2^2 + b2^2 = c2^2 in the case of a starting value of 4. (+) Lehmer symbols do not produce integer value triples via the above method. However, it is possible to manually generate these triples for composite and (+) Mersenne numbers, as in: a1=63, b1=1984, c1=1985 a2=249984, b2=3932287, c2=3940225 3932287 mod 2^11-1 = 0 I just thought I'd pass this on, I haven't found it mentioned elsewhere. Please let me know if anything doesn't check out. Attached Thumbnails   Last fiddled with by a nicol on 2017-12-17 at 19:11
2017-12-18, 00:14   #2
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts

Quote:
 Originally Posted by a nicol I noticed these residuals seem to be one and two less than b and c in a Pythagorean triple, as in:
what consequences does this have if you then consider it further, maybe you can check those to completion.

2017-12-18, 13:25   #3
a nicol

Nov 2016

29 Posts

Quote:
 Originally Posted by science_man_88 what consequences does this have if you then consider it further, maybe you can check those to completion.
Hi, which part were you thinking of checking to completion? I don't have the cpu time to run larger LL tests atm unfortunately.

I think these triples exist for all Mersenne numbers, I just thought it might be worth cataloguing the coincidence between them and the LL test & Lehmer symbols.

I think there might be a tree to follow here? I think that would be worth looking at?

https://en.wikipedia.org/wiki/Tree_o...gorean_triples

2017-12-18, 13:29   #4
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

838410 Posts

Quote:
 Originally Posted by a nicol Hi, which part were you thinking of checking to completion? I don't have the cpu time to run larger LL tests atm unfortunately. I think these triples exist for all Mersenne numbers, I just thought it might be worth cataloguing the coincidence between them and the LL test & Lehmer symbols. I think there might be a tree to follow here? I think that would be worth looking at? https://en.wikipedia.org/wiki/Tree_o...gorean_triples
we already know, that to be prime by the test, there are only two values the second to last residue can have. what is the density of pythagoren triples with the two values 1 apart ? that may be a place to start.

2017-12-18, 16:06   #5
Batalov

"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

9,391 Posts

Quote:
 Originally Posted by a nicol Using the Mersenne primes as an example: Calculate the second to last residual from a LL sequence with a starting value of 4: [8,111,128,130559,523263,65536,2147483648,618970019642654953077473279,162259276829213345377179500806143,18446744073709551616,...] Taking those residuals with a (-) Lehmer symbol: Residuals(s): [111,130559,523263,618970019642654953077473279,162259276829213345377179500806143,...] I noticed these residuals seem to be one and two less than b and c in a Pythagorean triple, as in: ...
This is trivial. Just look at their algebraic value in the material that you already quoted.
It is 2p - 1 - 2(p+1)/2, or in other words 2X2 - 2X - 1 with X=2(p-1)/2.
Of course there is a Pythagorean triple {a, 2X2 - 2X, 2X2 - 2X + 1}. Now, find a. It is 2X-1.

This is similar at looking at the definition of primes, writing a dozen of them, ...and then 'noticing' that they just happen to be numbers that are only divisible by themselves and 1. Or 'noticing' that they are all odd if they are > 2.

Everything else (' ...it is possible to manually generate these triples for composite and (+) Mersenne numbers') is hand-waving.

2017-12-18, 18:39   #6
a nicol

Nov 2016

358 Posts

Quote:
 Originally Posted by Batalov This is trivial. Just look at their algebraic value in the material that you already quoted. It is 2p - 1 - 2(p+1)/2, or in other words 2X2 - 2X - 1 with X=2(p-1)/2. Of course there is a Pythagorean triple {a, 2X2 - 2X, 2X2 - 2X + 1}. Now, find a. It is 2X-1. This is similar at looking at the definition of primes, writing a dozen of them, ...and then 'noticing' that they just happen to be numbers that are only divisible by themselves and 1. Or 'noticing' that they are all odd if they are > 2. Everything else (' ...it is possible to manually generate these triples for composite and (+) Mersenne numbers') is hand-waving.
Trivial, but not previously explicitly associated with the LL test in any material I was able to search out. So worth pointing out, I thought.

There is also the fact that the Lucas Lehmer sequences themselves are Heronian consecutive integer triangles - 14,194,37634,1416317954,2005956546822746114 are the b values for:

[13,14,15],[193,194,195],[37633,37634,37635]

Maybe there's also a trivial answer to why modding a Mersenne prime against one of the values of a Heronian triangle will eventually output another integer area triangle (some of the time)?

2017-12-18, 19:05   #7
xilman
Bamboozled!

"πΊππ·π·π­"
May 2003
Down not across

23·113 Posts

Quote:
 Originally Posted by a nicol Trivial, but not previously explicitly associated with the LL test in any material I was able to search out. So worth pointing out, I thought.
Hardly anything which is trivial is also worth pointing out. Indeed, that could serve as a definition of "trivial".

2017-12-18, 19:31   #8
a nicol

Nov 2016

29 Posts

Quote:
 Originally Posted by xilman Hardly anything which is trivial is also worth pointing out. Indeed, that could serve as a definition of "trivial".
How do you tell if the Lehmer symbol of a LL test is going to be + or -? Could you mention some of the methods you know for establishing this?

2017-12-18, 22:12   #9
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts

Quote:
 Originally Posted by a nicol How do you tell if the Lehmer symbol of a LL test is going to be + or -? Could you mention some of the methods you know for establishing this?
the URL you started with has some for the irregular start values.

Last fiddled with by science_man_88 on 2017-12-18 at 22:13

2017-12-18, 23:58   #10
a nicol

Nov 2016

1D16 Posts

Quote:
 Originally Posted by science_man_88 the URL you started with has some for the irregular start values.
Why, mathematically speaking, do these signs vary depending on the start value? Seems like there's a very large dense class theoretical answer to that. Maybe someone could help simplify the answer with some kind of visual analogy?

2017-12-19, 00:12   #11
Batalov

"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

222578 Posts

Quote:
 Originally Posted by a nicol How do you tell if the Lehmer symbol of a LL test is going to be + or -?
You don't.*
Quote:
 Originally Posted by a nicol Could you mention some of the methods you know for establishing this?
The method is: run Prime95 with the OutputIterations (iirc) changed...
If you want the same for s0 = 10, set InitialLLValue=10 in prime.txt.
If you want the same for s0 = 2/3, set InitialLLValue=23 in prime.txt

Just go and read there -
http://mersenneforum.org/showpost.ph...9&postcount=30

____
* Google for "Now that you've found it, it's gone / Now that you feel it, you don't".
No, there is no hidden meaning in this footnote. Most of the time, the point of that poem is true - for everyone.

 Similar Threads Thread Thread Starter Forum Replies Last Post Alberico Lepore Alberico Lepore 43 2018-01-17 15:55 Nick Number Theory Discussion Group 2 2016-12-18 14:49 Dougal Information & Answers 9 2009-02-06 10:25 Rokas Math 3 2005-01-02 03:50 jinydu Puzzles 6 2003-12-13 10:10

All times are UTC. The time now is 13:11.

Tue Apr 20 13:11:15 UTC 2021 up 12 days, 7:52, 0 users, load averages: 3.08, 3.26, 2.87