T.R | Title | User | Personal Name | Date | Lines |
---|
684.1 | | BEING::POSTPISCHIL | Always mount a scratch monkey. | Thu Mar 26 1987 09:06 | 17 |
| Re .0:
I do not know what you mean by "predicting primes". There are a number
of methods to test numbers for primality. A good college library
should have books on number theory or encryption which will discuss
such things. If you are just going to generate the prime numbers in
order, 2, 3, 5, and so on, the Sieve of Eratosthenes is fine. There
are algorithms for testing numbers hundreds of digits long for
primality that work probabilistically -- they do not guarantee
primeness, but they check for it by performing tests which prime
numbers pass but _most_ composite numbers fail. By doing thousands of
such tests, they can tell when it is extremely unlikely the number
being tested is composite. If you really want to dig in, look up
"number theory" in the library catalog and start reading.
-- edp
|
684.2 | try Calreal for a while . . . | THEBUS::KOSTAS | Wisdom is the child of experience. | Thu Mar 26 1987 09:47 | 78 |
| re. .0
Bernie,
below is some info on primes which you can get from Calreal. Calreal
is available pfrom the Toolshed.
/Kostas
$run calreal
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
<> <>
<> CALREAL is a mathematical calculator, that allows <>
<> real number computations plus trigometric functions <>
<> <>
<> FOR HELP ON HOW TO USE TYPE: HELP(1); <>
<> <>
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Today is THURSDAY 26-MAR-1987 09:34:50.42, EDT
Version : V2.6-013 KGG 18-March-1987
CALREAL> set information(1);
You have enabled information on functions.
CALREAL> primes up to (100);
2 3 5 7 11 13
17 19 23 29 31 37
41 43 47 53 59 61
67 71 73 79 83 89
97
There were: 25 prime(s) less than 100
CALREAL> near prime(2007);
Nearest prime(s) to 2007 is : 2011, and : 1999
CALREAL> is it a prime (1001);
A prime number is any positive integer p greater than 1
whose only positive integer divisors are 1 and p.
1001 is not a prime
CALREAL> palindromic primes up to ( 1000 );
2 3 5 7 11 101
131 151 181 191 313 353
373 383 727 757 787 797
919 929
There were: 20 palindromic prime(s) less than 1000
CALREAL> near palindromic prime ( 2007 );
Nearest palindromic prime(s) to 2007 is : 10301, and : 929
CALREAL> is it a palindromic prime (12221);
12221 is not a palindromic prime
CALREAL> mersenne prime(5);
A Mersenne prime is of the form: 2^k - 1.
Mersenne ( 5 ) = 31.00 is a prime
CALREAL> exit (1);
$
|
684.3 | Here's a good book | MODEL::YARBROUGH | | Thu Mar 26 1987 12:26 | 8 |
| I recently saw in one of the local bookstores a copy of A. H. Beiler's
"Recreations in the Theory of Numbers - The Queen of Mathematics
Entertains", published by Dover Press. It's easy to read and inexpensive,
and gives a lot of insight into the problems and methods. It deals a lot
with primes but also with many other related topics that you may find
interesting as well.
You might also do a SEARCH PRIME in this conference.
|
684.4 | Knuth's Seminumerical Algorithms (of course) | SMURF::JMARTIN | Something will turn up. | Thu Mar 26 1987 12:39 | 7 |
| Volume 2 of The Art of Computer Programming, probably available within
thirty feet of where you sit.
Section 4.5.4 discusses factoring a given number into primes, generating
lists of primes, and testing a given number for primality. It shows why
different algorithms are appropriate for these seemingly similar activities.
--Joe
|
684.5 | | BEING::RABAHY | | Mon Mar 30 1987 16:32 | 3 |
| Try the following command;
SHOW KEYWORD /FULL primes
|