CoCoA:NextPrime

From ApCoCoAWiki
Revision as of 10:02, 24 October 2007 by XMLBot (talk | contribs) (pushing XML rev. 1.46, again)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

NextPrime

find the next largest prime number

Description

This function computes the smallest prime number greater than N. If

N is negative or too large then the value zero is returned. This

function may generate primes larger than permitted as the characteristic of a finite field in CoCoA. On most platforms primes up to about 45000 can be generated; in some cases a higher limit exists.

Example

  NextPrime(1000);
1009
-------------------------------

Syntax

NextPrime(N:INT):INT

IsPrime

NextPPrime

   <type>integer</type>