mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   science_man_88 (https://www.mersenneforum.org/forumdisplay.php?f=140)
-   -   theory on Mersenne primes ? (https://www.mersenneforum.org/showthread.php?t=14151)

science_man_88 2011-09-04 13:51

[QUOTE=science_man_88;270755]Another line I've thought about is the fact that when I return D:
[CODE]
[[B]P + 1[/B], P^2 + [B]2*P - 1[/B], P^4 + 4*P^3 + 2*P^2 - [B]4*P - 1[/B], P^8 + 8*P^7 + 20*P^6 + 8*P^5 - 30*P^4 - 24*P^3 + 12*P^2 + [B]8*P - 1[/B],[/CODE]

All the highlighted endings are off by 2^x from the one that we check with it. Where x is the index into the sequence starting at x=0. P+1 is 1 over P, (2*p+1)-(2*p-1) =2, (4*p+3)-(4*p-1) = 4 and (8*P+7)-(8*P-1) = 8, so these can be turned into 1 term together.[/QUOTE]

I actually see an extension of this second line of thought:

[QUOTE]P^8 + 8*P^7 + 20*P^6 + 8*P^5 - 30*P^4 - 24*P^3 + 12*P^2 + 8*P - 1[/QUOTE] 8*p-1 = 8 off ( under in this case); (24*P^3 + 12*P^2)/P^2 = 24*P+12 24/8=3 and 3*7 =21-12 =9 so it's -9*P^2 off ; repeat with other:

(8*P^5-30*P^4)/P^4 = 8*P-30 which is below by 37 so -37*(P^4);
and the last group of 2 terms gives: 13*P^6;

turning it into P^8+13*P^6-37*P^4-9*P^2-8 nearly halving the terms needed to be figured out.

science_man_88 2011-09-04 14:09

[QUOTE=science_man_88;270805]I actually see an extension of this second line of thought:

8*p-1 = 8 off ( under in this case); (24*P^3 + 12*P^2)/P^2 = 24*P+12 24/8=3 and 3*7 =21-12 =9 so it's -9*P^2 off ; repeat with other:

(8*P^5-30*P^4)/P^4 = 8*P-30 which is below by 37 so -37*(P^4);
and the last group of 2 terms gives: 13*P^6;

turning it into P^8+13*P^6-37*P^4-9*P^2-8 nearly halving the terms needed to be figured out.[/QUOTE]

I must have messed up somewhere when I plug it into pari I got that the answer mod 31 was 5^2.

science_man_88 2011-09-10 14:04

[CODE](11:00)>((A)^2-2)^2-2
%78 = A^4 - 4*A^2 + 2
(11:00)>((p+2)^2-2)
%79 = p^2 + 4*p + 2[/CODE]

I thought about this last night it kinda interest me, just because the absolute ( without sign) values of the coefficients are the same if you let A=P+1, we can say for P=3 = 2^p-1 and p=2 that if the previous one is x mod (p+2) the next one is x mod (P+1) now I know we'd have to factor in that they go up by different amounts. (p=p+1 and P=2*P+1).

if only I could make more sense of how to figure out some of these.

science_man_88 2011-10-31 19:50

[QUOTE]p=Mod 24 2*k*p+1= mod 24 k= mod 12
1 1 0
7 3
17 8
23 11

19 1 0
7 9
17 8
23 5

13 1 0
7 3
17 8
23 11

7 1 0
7 9
17 8
23 5

17 1 0
7 3
17 4
23 7

11 1 0
7 9
17 4
23 1

5 1 0
7 3
17 4
23 7

23 1 0
7 9
17 4
23 1
[/QUOTE] using this is my next idea the reason I kinda see this as useful ( though further thought makes it sound less useful to me) is because, 0 and 2 mod 3 = 8 values mod 12 I only need 4, but they depend on a check of mod 24 for p. I came to the second column from the fact that 1 or 5 mod 6 and 1 or 7 mod 8 give them. the first column came about from looking for primes that 1,3,5,7 mod 8 and once I found examples I knew I couldn't exclude them, taking them with 1 or 5 mod 6 gave the values mod 24. the third column is k mod 12 mostly because the conditions I saw to get the mod 8 and mod 6 remainders were all mod 3 or mod 4 giving rise to the mod 12 values.

science_man_88 2011-11-17 00:39

sigma(2^p)-sigma(2^p-1)==2^p-1

I get that these are Mersenne exponents from talk in the OEIS:

[QUOTE="http://oeis.org/A000668"]Mersenne primes are solutions to sigma(n+1)-sigma(n)=n as perfect numbers (A000396(n)) are solutions to sigma(n)=2n - Benoit Cloitre (benoit7848c(AT)orange.fr), Feb 07 2002
Appears to give all n such that sigma(n+1)-sigma(n)=n - Benoit Cloitre (benoit7848c(AT)orange.fr), Aug 27 2002
If n is in the sequence then sigma(sigma(n))=2n+1. Is it true that this sequence gives all numbers n such that sigma(sigma(n))=2n+1? - Farideh Firoozbakht (mymontain(AT)yahoo.com), Aug 19 2005[/QUOTE]

I'm just wondering if there's a speedup. using this as a test I made a pari code to find the Mersenne prime exponents it took ~430 milliseconds with a forprime loop to find all exponents under 130. mind you I'm more thinking a check of p for some property or such.

LaurV 2011-11-17 03:05

The sigma function is factoring the number first. There is no other way to compute it. It would take a longer amount of time to compute sigma(x) than it would take to factor x, especially if x has a lot of factors. Computing sigma means factoring x, then combining all its prime factors to make its divisors list, then add them up. There is no speedup. Try it for higher prime exponent and you could see. Try it for 1061. To find sigma(2^1061-1), pari has to factor it first. Try it for sigma(2^1060-1), for which you know all the factors, they are on factorDB, but they are 26 in number, so to make "divisors list" of them you have to combine the factors in 2^26 ways (less, because 5 is doubled), which is in itself very time-consumming.

Computing sigma is semantically equivalent with "factorint(x)" then do "divisors(x)" then sum them.

Try in pari "divisors(2^5*3^5*7^5*11^5*13^5)", you have the smallest primes and you have all the factors known immediately, and about the same amount of factors as above, but to make divisors you will be aging before finishing.

Then you have to sum them up to get sigma.

edit:
[QUOTE=science_man_88;278823] using this as a test I made a pari code to find the Mersenne prime exponents it took ~430 milliseconds with a forprime loop to find all exponents under 130[/QUOTE]

try 227 or 251, etc (something more difficult to get its sigma, below 300). Unless you did something totally different from the next oneliner (which is the fastest, as it computes the powering by shift and computes b only once, and has already all the primes precomputed), you will need to wait ages....

[code]
forprime(n=2,1000, a=1<<n; b=a-1; printf("...%d...%c",n,13); if(sigma(a)-sigma(b)==b, print(n" ")))
[/code]

Then think about how much time a LL test takes for 227 or 251, etc.

axn 2011-11-17 05:04

[QUOTE=LaurV;278839] It would take a longer amount of time to compute sigma(x) than it would take to factor x, especially if x has a lot of factors. Computing sigma means factoring x, then combining all its prime factors to make its divisors list, then add them up. <snip>
so to make "divisors list" of them you have to combine the factors in 2^26 ways (less, because 5 is doubled), which is in itself very time-consumming.
[/QUOTE]

you don't actually make a "divisors" list to compute sigma. there is a much faster way. computing the sigma, given the factorization, is trivial.

[url]http://en.wikipedia.org/wiki/Divisor_function[/url]

LaurV 2011-11-17 05:45

[QUOTE=axn;278850]you don't actually make a "divisors" list to compute sigma.[/QUOTE]

Yarrr! :sirrobin:I didn't know that! Now after reading, it sounds logical. However the "factoring the number" part stays, and what I said is common sense: if we could compute sigma without factoring the number, then it would make no sense to waste all the time factoring aliquot sequences...

axn 2011-11-17 06:12

[QUOTE=LaurV;278859]However the "factoring the number" part stays, and what I said is common sense: if we could compute sigma without factoring the number, then it would make no sense to waste all the time factoring aliquot sequences...[/QUOTE]
Agreed :smile:

Random Poster 2011-11-17 11:16

[QUOTE=LaurV;278859]if we could compute sigma without factoring the number[/QUOTE]
...then we would be breaking RSA...

science_man_88 2011-11-17 18:59

[QUOTE=LaurV;278859]Yarrr! :sirrobin:I didn't know that! Now after reading, it sounds logical. However the "factoring the number" part stays, and what I said is common sense: if we could compute sigma without factoring the number, then it would make no sense to waste all the time factoring aliquot sequences...[/QUOTE]

[CODE]forprime(n=2,200,if(n%4==3 && isprime(2*n+1),next(),if(sigma(2^n)-sigma(2^n-1)==2^n-1,print1(n","))))[/CODE] this is what I have so far.


All times are UTC. The time now is 10:02.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.