![]() |
|
|
#1 |
|
Feb 2004
France
16248 Posts |
It looks like this sequence (n such that (2^n-5)/3 is prime or PRP, n odd) does not exist in OEIS:
Code:
7, 13, 19, 31, 51, 55, 85, 111, 319, 373, 505, 811, 901, 943, 1117, 2199, 2431, 1) n == 1 or 2 mod 3 Code:
for(i=3, 10000, n=2*i+1; N=(2^n-5)/3; s=4; s=s^2-2; x=s; for(j=1, n-1, x=Mod(x^2-2,N)); if(x==s, print1(n,", "))) 7, 13, 19, 31, 55, 85, 319, 373, 505, 811, 901, 943, 1117, 2431, 5059, Code:
for(i=3, 10000, n=2*i+1; if(Mod(n,3)==0, N=(2^n-5)/3; s=13; s=s^2-2; x=s; for(j=1, n-1, x=Mod(x^2-2,N)); if(x==s, print1(n,", ")))) 51, 111, 2199, |
|
|
|
|
|
#2 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
Quote:
http://mersenneforum.org/showpost.ph...&postcount=396 is my combo of TF and LLT into one for the mersennes just append the values needed and it can work for any of these for TF or LL. |
|
|
|
|
|
|
#3 | |
|
Feb 2004
France
22·229 Posts |
Quote:
I do not understand your code. Which language ? I know basic PARI/gp code only. The difficulty is to find a universal initial value (the seed) and a number of iterations that work fine with all primes (or PRPs) of the sequence being studied, and to deal with exceptions (n== 0 mod 3 like here). However, it is not so difficult. But I never thought to start from a seed which is outside of the cycle. |
|
|
|
|
|
|
#4 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
Quote:
Last fiddled with by science_man_88 on 2015-08-30 at 18:29 |
|
|
|
|
|
|
#5 |
|
Feb 2004
France
22×229 Posts |
isprime() returns:
Code:
7, 13, 19, 31, 51, 55, 85, 111, 319, 373, 505, 811, 901, 943, 1117, 2199, 2431, 5059, |
|
|
|
|
|
#6 |
|
Feb 2004
France
39416 Posts |
There is an issue with n==0 mod 3. Maybe 21 should be used as seed instead of 13, which misses 2199.
More values are required. |
|
|
|
|
|
#7 |
|
Sep 2002
Database er0rr
2·32·11·19 Posts |
Tony, this brings into question how you choose the seeds.
Last fiddled with by paulunderwood on 2015-08-30 at 22:17 |
|
|
|
|
|
#8 |
|
"Dana Jacobsen"
Feb 2011
Bangkok, TH
16148 Posts |
For comparison, I get these BPSW PRPs from my program:
Code:
7, 13, 19, 31, 51, 55, 85, 111, 319, 373, 505, 811, 901, 943, 1117, 2199, 2431, 5059, 9423, 12601, 20295, 22755, 38659, 57219, 64179, ... |
|
|
|
|
|
#9 |
|
Sep 2002
Database er0rr
72628 Posts |
|
|
|
|
|
|
#10 |
|
Jul 2014
Montenegro
2·13 Posts |
My solution :
For n>10 and n is odd . Code:
PPT(n)=
{
my(s=Mod(6,(2^n-5)/3));
for(i=1,n-1,s=s^2-2);
s==2*polchebyshev(4,1,3)
}
|
|
|
|
|
|
#11 | |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
2×47×101 Posts |
Quote:
With both slower than a Fermat PRP test (which is proven to find all primes and PRPs), too! |
|
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Endorsement Prime Numbers finding algorithm | marouane | Computer Science & Computational Number Theory | 18 | 2017-11-06 15:41 |
| pari-algorithm for finding Gaussian integer bases | devarajkandadai | Software | 0 | 2017-10-05 04:54 |
| OEIS - 2^n-5 - LLT-like algorithm for finding PRPs | T.Rex | Miscellaneous Math | 13 | 2015-09-01 13:09 |
| OEIS - A050414 - 2^n-3 - LLT-like algorithm for finding PRPs | T.Rex | Miscellaneous Math | 16 | 2015-08-31 02:32 |
| New Prime-Finding Algorithm Discovered! L00K HERE! | dilip_1bhowmik | Miscellaneous Math | 22 | 2009-01-09 23:39 |