mersenneforum.org  

Go Back   mersenneforum.org > Math Stuff > Computer Science & Computational Number Theory > PARI/GP

Reply
 
Thread Tools
Old 2010-08-18, 23:01   #650
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

32208 Posts
Default

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

Last fiddled with by 3.14159 on 2010-08-18 at 23:01
3.14159 is offline   Reply With Quote
Old 2010-08-19, 01:25   #651
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Sorry, I've been sick... not quite up to my usual posting routine.

Quote:
Originally Posted by 3.14159 View Post
Okay: It cannot use vectors and loops, as any method using these is dreadfully inefficient.
Sieving (with vectors) = fast, trial division = slow.
CRGreathouse is offline   Reply With Quote
Old 2010-08-19, 04:21   #652
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24·3·5·7 Posts
Default

Quote:
Originally Posted by CRGreathouse
Sieving (with vectors) = fast, trial division = slow.
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.

Last fiddled with by 3.14159 on 2010-08-19 at 04:28
3.14159 is offline   Reply With Quote
Old 2010-08-19, 04:36   #653
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

10111010110112 Posts
Default

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
};
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.

Last fiddled with by CRGreathouse on 2010-08-19 at 04:38
CRGreathouse is offline   Reply With Quote
Old 2010-08-19, 13:07   #654
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24·3·5·7 Posts
Default

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.

Last fiddled with by 3.14159 on 2010-08-19 at 13:27
3.14159 is offline   Reply With Quote
Old 2010-08-19, 13:54   #655
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24×3×5×7 Posts
Default

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.

Last fiddled with by 3.14159 on 2010-08-19 at 13:56
3.14159 is offline   Reply With Quote
Old 2010-08-19, 13:57   #656
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24·3·5·7 Posts
Default

Now, back to searching for general arithmetic progression primes. The odds will land me something.

(P.S: Found 5358 * 905011470 + 1 (≈ 532 digits))

Looking for k * p(125)#^66 + 1 (≈ 19100 digits)

Last fiddled with by 3.14159 on 2010-08-19 at 14:11
3.14159 is offline   Reply With Quote
Old 2010-08-19, 14:12   #657
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

10111010110112 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
Also: The code doesn't work (Syntax error.)
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)*.
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.
so I guess you'll just have to drop that trailing ,b.
CRGreathouse is offline   Reply With Quote
Old 2010-08-19, 14:14   #658
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24·3·5·7 Posts
Default

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)

Last fiddled with by 3.14159 on 2010-08-19 at 14:14
3.14159 is offline   Reply With Quote
Old 2010-08-19, 14:15   #659
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
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.)
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:
Originally Posted by 3.14159 View Post
The sieve needs to be generalized towards any arithmetic progression, I guess.
Changed, not generalized, from variable-n to variable-k.
CRGreathouse is offline   Reply With Quote
Old 2010-08-19, 14:20   #660
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

838410 Posts
Default

CRG if you're sick take a rest or Questions will make you worse.
science_man_88 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why do I sometimes see all the <> formatting commands when I quote or edit? cheesehead Forum Feedback 3 2013-05-25 12:56
Passing commands to PARI on Windows James Heinrich Software 2 2012-05-13 19:19
Ubiquity commands Mini-Geek Aliquot Sequences 1 2009-09-22 19:33
64-bit Pari? CRGreathouse Software 2 2009-03-13 04:22
Are these commands correct? jasong Linux 2 2007-10-18 23:40

All times are UTC. The time now is 23:05.


Fri Aug 6 23:05:10 UTC 2021 up 14 days, 17:34, 1 user, load averages: 3.39, 3.74, 3.87

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

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.