![]() |
Longest streak of trial-division-detected candidates ever seen by me:
[code]9584 * p(65)#^40 + 1 has factors: 30869 9585 * p(65)#^40 + 1 has factors: 26237 9586 * p(65)#^40 + 1 has factors: 12959 9587 * p(65)#^40 + 1 has factors: 1831 9588 * p(65)#^40 + 1 has factors: 123853 9589 * p(65)#^40 + 1 has factors: 1511 9590 * p(65)#^40 + 1 has factors: 6701 9591 * p(65)#^40 + 1 has factors: 4723 9592 * p(65)#^40 + 1 has factors: 99103 9593 * p(65)#^40 + 1 has factors: 9091 9594 * p(65)#^40 + 1 has factors: 2207[/code] |
Sorry, I've been sick... not quite up to my usual posting routine.
[QUOTE=3.14159;226068]Okay: It cannot use vectors and loops, as any method using these is dreadfully inefficient.[/QUOTE] Sieving (with vectors) = fast, trial division = slow. |
[QUOTE=CRGreathouse]Sieving (with vectors) = fast, trial division = slow.
[/QUOTE] Okay: I need a decent script for that; This is well outside of my range. I'm unsure I could complete it on my own. |
I'll post my recent sieve; maybe you can modify it. It was the work of just a few minutes; I'm sure it could be made much more efficient.
Your sieve is variable-k which is easier to program (but you'll have to make the changes). [code]\\ Finding terms for A176494 sieve(lim,sz,sm=1)={ my(v=vectorsmall(sz,i,1)); forprime(p=3,lim, b=znorder(Mod(2,p)); trap(,next, a=znlog(2293,Mod(2,p),b) ); if(Mod(2,p)^a!=2293, print("bad at "p);next); a+=b*ceil((sm-a)/b); forstep(n=a,sz,b, v[n]=0 ) ); a=0; for(i=sm,sz,if(v[i],a++;write("abc.txt", i))); a };[/code] Replace the a=0 and following lines by v (just that one character) if you want to get the vector instead of writing it to a file. This checks for terms with n = sm to n = sz, sieving out the primes up to lim. Ugh, still sick. |
The only ideas I have for code are the beginning, and the end:
I require 5 arguments, not three. (k value range; n; and primes to sieve range.) The sieve needs to be generalized towards any arithmetic progression, I guess. Also: The code doesn't work (Syntax error.) Well, I'll be off to try and make the appropriate changes. |
Blah.. This yields no progress. I'll just give up. Endless failed ideas, with many more soon-to-be failed ideas in mind.
Well, I forfeit. |
Now, back to searching for general arithmetic progression primes. The odds will land me something.
(P.S: Found 5358 * 905011[sup]470[/sup] + 1 (≈ 53[sup]2[/sup] digits)) Looking for k * p(125)#^66 + 1 (≈ 19100 digits) |
[QUOTE=3.14159;226139]Also: The code doesn't work (Syntax error.)[/QUOTE]
That's interesting. My version says [code]znlog(x,g,{o}): return the discrete logarithm of x in (Z/nZ)* in base g. If present, o represents the multiplicative order of g. If no o is given, assume that g generate (Z/nZ)*.[/code] but I see that my Windows version says [code]znlog(x,g): g as output by znprimroot (modulo a prime). Return smallest non-negative n such that g^n = x.[/code] so I guess you'll just have to drop that trailing ,b. |
The odds of finding something:
Normally: 1 in about 44000. Potential prime factors eliminated: first 125 primes: Leaving it at about 1 in 3750. (w/no sieving) |
[QUOTE=3.14159;226139]The only ideas I have for code are the beginning, and the end:
I require 5 arguments, not three. (k value range; n; and primes to sieve range.)[/QUOTE] Four -- the code should probably just start at 2 or 3 for the prime range. All you need to add in terms of arguments is the n. [QUOTE=3.14159;226139]The sieve needs to be generalized towards any arithmetic progression, I guess.[/QUOTE] Changed, not generalized, from variable-n to variable-k. |
CRG if you're sick take a rest or Questions will make you worse.
|
| All times are UTC. The time now is 23:06. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.