mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2005-01-25, 20:43   #1
Unregistered
 

67·73 Posts
Talking subsets of primes

Can anyone direct me to a prime number generator with the facility of listing subsets?
emanuelmarks@aol.com
  Reply With Quote
Old 2005-01-26, 01:43   #2
Unregistered
 

3,343 Posts
Default

I don't know what you mean by a facility of listing subsets...but the equation y=x^2 + x + 17 will work to generate primes (not all of them in order, it skips some) up to a certain point, just don't ask me what that point is.
  Reply With Quote
Old 2005-01-26, 08:10   #3
geoff
 
geoff's Avatar
 
Mar 2003
New Zealand

13×89 Posts
Default

The PARI/GP calculator might do what you want. For example to list each prime in the range 2-1000 which ends in a 7:

forprime(p=2,1000,if(p%10==7,print(p)))

It is free software, or you can use the online version at http://modular.fas.harvard.edu/calc/.
geoff is offline   Reply With Quote
Old 2005-01-27, 00:37   #4
geoff
 
geoff's Avatar
 
Mar 2003
New Zealand

13·89 Posts
Default

It seems the online version of the GP calculator won't accept any input containing the % character, so the example above could be changed to

forprime(p=2,1000,if(gcd(p+3,10)==10,print(p)))

Better to install the full version I think :-)

Last fiddled with by geoff on 2005-01-27 at 00:51
geoff is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mersenne Primes p which are in a set of twin primes is finite? carpetpool Miscellaneous Math 3 2017-08-10 13:47
Distribution of Mersenne primes before and after couples of primes found emily Math 34 2017-07-16 18:44
Product of consecuative terms in subsets of primes is 1 (mod ab) carpetpool Miscellaneous Math 1 2017-02-25 16:08
Spanning and subsets jacko Homework Help 2 2007-09-11 16:44
possible primes (real primes & poss.prime products) troels munkner Miscellaneous Math 4 2006-06-02 08:35

All times are UTC. The time now is 04:02.

Fri Apr 16 04:02:36 UTC 2021 up 7 days, 22:43, 0 users, load averages: 2.10, 1.82, 1.55

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.