[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

684.0. "Help me find prime numbers, please" by PARSEC::BOURQUE () Thu Mar 26 1987 11:04

    Greeting,
    
    I'm new to this conference and I'm wondering if someone could help
    me.  I don't have much of a math background, mostly high school
    level.  I have an interest in PRIME numbers.  In particular I'd
    like to know more about predicting primes and testing for primes.
    I'd like to know what methods are presently available and accepted
    as valid as well as methods that have been tried and proved invalid.
    If someone can tell me where I could find that kind of information
    it would be much appreciated.
    
    Thanks in advance,
    Bernie Bourque
T.RTitleUserPersonal
Name
DateLines
684.1BEING::POSTPISCHILAlways mount a scratch monkey.Thu Mar 26 1987 12:0617
    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.2try Calreal for a while . . .THEBUS::KOSTASWisdom is the child of experience.Thu Mar 26 1987 12:4778
    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.3Here's a good bookMODEL::YARBROUGHThu Mar 26 1987 15:268
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.4Knuth's Seminumerical Algorithms (of course)SMURF::JMARTINSomething will turn up.Thu Mar 26 1987 15:397
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.5BEING::RABAHYMon Mar 30 1987 19:323
    Try the following command;
    
    	SHOW KEYWORD /FULL primes