FaureSequenceNextPrime Method |
Returns the smallest prime greater than or equal to n.
Namespace: Imsl.StatAssembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax public static int NextPrime(
int n
)
Public Shared Function NextPrime (
n As Integer
) As Integer
public:
static int NextPrime(
int n
)
static member NextPrime :
n : int -> int
Parameters
- n
- Type: SystemInt32
An int which specifies the first number to try as a prime.
Return Value
Type:
Int32
An
int which specifies a prime greater than or equal to
n.
Remarks
If n is less than or equal to 2 then 2 is returned.
See Also