<-- Previous || Up || Next -->

Nth Prime Function
Math Arithmetic Class

Public Function NthPrime( _
    ByVal vNumber As Variant _
    ) As Variant

"Nth Number Prime"
Return the Nth number in the prime number sequence 2, 3, 5, 7, 11, etc.

Examples:
    NthPrime(0) = 1
    NthPrime(1) = 2
    NthPrime(2) = 3
    NthPrime(3) = 5
    NthPrime(4) = 7
    NthPrime(5) = 11
See also:
    IsPrime Function
    NextPrime Function
    PreviousPrime Function
vNumber: Function returns the prime number at this position within the list of all prime numbers. Function returns Null if vNumber is Null or cannot be fixed up to a number.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.