PRIME
Name
PRIME
Purpose
Return an array with the specified number of prime numbers.
EXPLANATATION:
This procedure is similar to PRIMES in the standard IDL distribution,
but stores results in a common block, and so is much faster
Calling Sequence
p = prime(n)
Inputs
n = desired number of primes, scalar positive integer
Outputs
p = resulting array of primes, vector of positive integers
Common Blocks
prime_com
Notes
Note: Primes that have been found in previous calls are
remembered and are not regenerated.
Modification History
R. Sterner 17 Oct, 1985.
R. Sterner, 5 Feb, 1993 --- fixed a bug that missed a few primes.
Converted to IDL V5 March 1999
Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.