|
IDL Reference Guide: Procedures and Functions |
|
The PRIMES function computes the first K prime numbers.
This routine is written in the IDL language. Its source code can be found in the file primes.pro in the lib subdirectory of the IDL distribution.
Result = PRIMES(K)
The result is a K-element long integer vector.
An integer or long integer scalar that specifies the number of primes to be computed.
To compute the first 25 prime numbers:
PRINT, PRIMES(25)
IDL prints: