# The nth prime number (nth_prime)

The n-th prime, counting 2 as the first.

## How to write it

### nth_prime(n)

**n**

Which prime, from 1. Takes a whole number.

## Examples

- $\displaystyle \operatorname{nth\_prime}(10) = 29$

  `nth_prime(10)`

  In the solver, `nth_prime(10)` gives `29`.

  [Open in the solver](https://hilberon.com/?q=nth_prime%2810%29)

## Related functions

- [next_prime](https://hilberon.com/library/next_prime)

  The least prime greater than a number.
- [previous_prime](https://hilberon.com/library/previous_prime)

  The greatest prime less than a number.
- [prime_nu](https://hilberon.com/library/prime_nu)

  How many distinct primes divide a whole number.
- [prime_omega](https://hilberon.com/library/prime_omega)

  How many primes divide a whole number, counted with multiplicity.
- [prime_pi](https://hilberon.com/library/prime_pi)

  How many primes are at most a number.
- [is_prime_power](https://hilberon.com/library/is_prime_power)

  Test whether a whole number is a power of a prime.

---
Source: https://hilberon.com/library/nth_prime
