![]() |
![]() |
#12 | |||
Feb 2017
Nowhere
23·17·47 Posts |
![]() Quote:
As to "saving time" in running code: If I'm writing a Pari-GP 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^2-3);forstep(n=7,500,24,r=lift(lift(-(Mod(1,n)*w)^((n+1))));if(r==2,print(n" "lift(Mod(2,n)^((n-1)/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^2-3);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)^((n-1)/2))))) ? Code:
? w=Mod(x+1,x^2-3);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)^((n-1)/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 Lp+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 2023-01-26 at 15:49 Reason: Insert missing modifier "prime" |
|||
![]() |
![]() |
![]() |
#13 |
Dec 2022
5×7×13 Posts |
![]()
The term 'Lucas-Lehmer 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 | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Was Rejected as a Crank Idea 500 Years Ago | a1call | Lounge | 21 | 2019-10-23 02:57 |
Do-it-yourself, crank, mersenne prediction thread. | Uncwilly | Miscellaneous Math | 85 | 2017-12-10 16:03 |
Standard crank division by zero thread | Don Blazys | Miscellaneous Math | 646 | 2017-02-06 23:09 |
Crank Emoticon | TimSorbet | Forum Feedback | 21 | 2007-03-06 19:21 |
Proposal: "Math for beginners" subforum | Mystwalker | Math | 18 | 2005-05-30 03:53 |