20230126, 15:44  #12  
Feb 2017
Nowhere
6,229 Posts 
Quote:
As to "saving time" in running code: If I'm writing a PariGP script to do numerical verification, and the numbers are fairly small, I don't care if my script is total kludge. As long as it does what I intend, and runs in a reasonable length of time, I'm happy. If anything mathematically interesting turns up, then I'll either try to find a mathematical proof, write a faster routine, or turn the problem over to someone who's a better programmer than I am and/or has better software for the purpose (which is just about anybody else on this Forum). As a case in point, it occurred to me to try a different Lucas test which also applies to p == 7 (mod 24). As an initial check, I ran a "verbose" version up to a very small limit, just to make sure it was doing what I wanted it to do: Code:
? w=Mod(x+1,x^23);forstep(n=7,500,24,r=lift(lift((Mod(1,n)*w)^((n+1))));if(r==2,print(n" "lift(Mod(2,n)^((n1)/2))))) 7 1 31 1 79 1 103 1 127 1 151 1 199 1 223 1 271 1 367 1 439 1 463 1 487 1 ? Code:
? w=Mod(x+1,x^23);forstep(n=7,50000000,24,r=lift(lift((Mod(1,n)*w)^((n+1))));if(r==2&&!isprime(n),print(n" "factor(n)" "lift(Mod(2,n)^((n1)/2))))) ? Code:
? w=Mod(x+1,x^23);forstep(n=49999999,100000000,24,r=lift(lift((Mod(1,n)*w)^((n+1))));if(r==2&&!isprime(n),print(n" "factor(n)" "lift(Mod(2,n)^((n1)/2))))) ? Quote:
So you instead adopted a term which already has a meaning different from your usage? Outstanding! Quote:
Or how about this: Given that for prime p == 7 (mod 24) we have L_{p+1} == 2 (mod p) (can you prove this?), it follows that L_{(p+1)/2} is either 2 or 2. (Do you know why?) The result L_{(p+1)/4} == 0 (mod p) depends on the fact that L_{(p+1)/2} == 2 (mod p) always, rather than +2. (Can you prove this fact?) Now, the argument used to prove L_{(p+1)/4} == 0 (mod p) for prime p == 7 (mod 24), simply does not work for composite numbers n == 7 (mod 24). Yet in some cases, as we have seen, the conclusion holds anyway. If it's not for the reason that insures its validity for primes, why? Last fiddled with by Dr Sardonicus on 20230126 at 15:49 Reason: Insert missing modifier "prime" 

20230127, 13:42  #13 
Dec 2022
233 Posts 
The term 'LucasLehmer pseudoprimes' seems not yet in use, and I gave an appropriate definition, so there should be no problem there. If OEIS were to add this list, they might well give it that, or some similar, title (they're not very consistent though).

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Was Rejected as a Crank Idea 500 Years Ago  a1call  Lounge  21  20191023 02:57 
Doityourself, crank, mersenne prediction thread.  Uncwilly  Miscellaneous Math  85  20171210 16:03 
Standard crank division by zero thread  Don Blazys  Miscellaneous Math  646  20170206 23:09 
Crank Emoticon  TimSorbet  Forum Feedback  21  20070306 19:21 
Proposal: "Math for beginners" subforum  Mystwalker  Math  18  20050530 03:53 