Institut für Astronomie und AstrophysikAbteilung AstronomieWaldhäuser Str. 64, D-72076 Tübingen, Germany |
PRIME
Return an array with the specified number of prime numbers.
This procedure is similar to PRIMES in the standard IDL distribution, but stores results in a common block, and so is much faster
p = prime(n)
n = desired number of primes, scalar positive integer
p = resulting array of primes, vector of positive integers
prime_com
Note: Primes that have been found in previous calls are remembered and are not regenerated.
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.
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]