mersenneforum.org  

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

Reply
 
Thread Tools
Old 2010-09-01, 14:04   #1277
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

69016 Posts
Default

Quote:
Originally Posted by science_man_88
it's up, and doesn't look like he did.
Meh, I made the corrections myself. All Charles needs to do is add the b-file. Or, if I think of a working script, I can do this myself!

Last fiddled with by 3.14159 on 2010-09-01 at 14:06
3.14159 is offline   Reply With Quote
Old 2010-09-01, 14:12   #1278
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
Meh, I made the corrections myself. All Charles needs to do is add the b-file. Or, if I think of a working script, I can do this myself!
pretty sure I got it working if i declare it in 2 parts

Code:
(11:08) gp > w(x) = x^x
%85 = (x)->x^x
(11:09) gp > w(4)
%86 = 256
(11:10) gp > w(4)
%87 = 256
(11:10) gp > kbb(a, x, m) = { if(x<w(m), for(n=a, x, if(isprime(n*m^m+1), print1(n*m^m+1, ", ")) )); }
(11:10) gp > kbb(1,3,4)
257, 769,
science_man_88 is offline   Reply With Quote
Old 2010-09-01, 14:18   #1279
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Code:
kbb(a, x, m) = if(x<m^m, for(n=a, x, if(isprime(n*m^m+1), print1(n*m^m+1, ", ")) ))
this one works on my end to give the same result in one function.

Last fiddled with by science_man_88 on 2010-09-01 at 14:18
science_man_88 is offline   Reply With Quote
Old 2010-09-01, 14:25   #1280
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

if you want them in order pass them to to a vector then use vecsort() to sort them oh and if you want to loop until a specific n you could add loops then call this script to print for all x<m^m etc.
science_man_88 is offline   Reply With Quote
Old 2010-09-01, 14:30   #1281
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24×3×5×7 Posts
Default

Quote:
Originally Posted by science_man_88
if you want them in order pass them to to a vector then use vecsort() to sort them oh and if you want to loop until a specific n you could add loops then call this script to print for all x<m^m etc.
Yes, yes, I'm working on the sequence's b-file. Unless Charles decided to hinder my efforts by sending it first.

Last fiddled with by 3.14159 on 2010-09-01 at 14:31
3.14159 is offline   Reply With Quote
Old 2010-09-01, 14:31   #1282
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
Yes, yes, I'm working on the sequence's b-file.
I was just giving suggestions as I know what's likely to be asked.
science_man_88 is offline   Reply With Quote
Old 2010-09-01, 14:39   #1283
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

32208 Posts
Default

Quote:
Originally Posted by science_man_88
I was just giving suggestions as I know what's likely to be asked.
I give up. I'll let Charles work on that. I'll work on the sequence, with no restriction. In this case, b > 1. (This means the set of 4n + 1 primes is a subset of this sequence.)

Last fiddled with by 3.14159 on 2010-09-01 at 14:41
3.14159 is offline   Reply With Quote
Old 2010-09-01, 14:51   #1284
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

Here's what I submitted:
Code:
%I A180362
%S A180362 5,13,109,163,257,271,379,433,487,541,769,3329,7681,7937,9473,10753,11777,
%T A180362 12289,13313,14081,14593,15361,17921,18433,19457,22273,23041,23297,25601,
%U A180362 26113,26881,30977,31489,32257,36097,36353,37501,37633,37889,39937,40193
%N A180362 Primes of the form k * n^n + 1 with k < n^n.
%C A180362 A result of Heath-Brown shows, on the GRH, that this sequence is infinite; can this be proved unconditionally? The averaged result of Bombieri-Friedlander-Iwaniec does not seem to be strong enough.
%H A180362 Charles R Greathouse IV, <a href="b180362.txt">Table of n, a(n) for n = 1..10000</a>
%H A180362 D. R. Heath-Brown, "<a href="http://eprints.maths.ox.ac.uk/166/">Zero-free regions for Dirichlet L-functions, and the least prime in an arithmetic progression</a>", Proceedings of the London Mathematical Society 64:3 (1992), pp. 265-338.
%F A180362 k * n^n + 1, where k < n^n.
%e A180362 a(4) = 109, because 4 * 3^3 + 1 = 109, which is prime, and 4 < 27.
%o A180362 (PARI) isA180362(n)=my(b=2);while(b^b<n,if(n%(b^b)==1 && n < b^(2*b), return(isprime(n)));b++);0
%K A180362 nonn,new
%O A180362 1,1
%A A180362 Kevin Batista (kevin762401(AT)yahoo.com), Aug 30 2010
CRGreathouse is offline   Reply With Quote
Old 2010-09-01, 14:54   #1285
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
Yes, yes, I'm working on the sequence's b-file. Unless Charles decided to hinder my efforts by sending it first.
I told you in #1246 I already had it...
CRGreathouse is offline   Reply With Quote
Old 2010-09-01, 14:57   #1286
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24×3×5×7 Posts
Default

Quote:
Originally Posted by CRGreathouse
I told you in #1246 I already had it...
Not to worry, I only submitted the corrections. I never sent the b-file.

Also: Made sequence A175768 for the sequence with no restriction on k, meaning the 4n + 1 primes are a subset of the sequence, and my guess on how much of the sequence are 4n + 1 primes = 85 to 99 percent.

I have the members of this sequence up to 4k.

Last fiddled with by 3.14159 on 2010-09-01 at 15:02
3.14159 is offline   Reply With Quote
Old 2010-09-01, 14:58   #1287
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
I'll work on the sequence, with no restriction. In this case, b > 1. (This means the set of 4n + 1 primes is a subset of this sequence.)
When you submit that sequence, you may wish to include its relative density in the primes (you can probably work this out, or else find my post where I give it) and cross-references (at least to A180362).
CRGreathouse is offline   Reply With Quote
Reply



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:12.


Fri Aug 6 23:12:57 UTC 2021 up 14 days, 17:41, 1 user, load averages: 4.28, 4.23, 4.06

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.