galois.kth_prime(k: int) int

Returns the \(k\)-th prime, where \(k = \{1,2,3,4,\dots\}\) for primes \(p = \{2,3,5,7,\dots\}\).

Parameters:
k: int

The prime index (1-indexed).

Returns:

The \(k\)-th prime.

Examples

In [1]: galois.kth_prime(1)
Out[1]: 2

In [2]: galois.kth_prime(2)
Out[2]: 3

In [3]: galois.kth_prime(3)
Out[3]: 5

In [4]: galois.kth_prime(1000)
Out[4]: 7919