# partitions_p function

How many ways a whole number is a sum of positive whole numbers, in any order of terms.

## How to write it

### partitions_p(n)

**n**

A whole number. Takes a whole number.

## Examples

- $\displaystyle \operatorname{partitions\_p}(10) = 42$

  `partitions_p(10)`

  In the solver, `partitions_p(10)` gives `42`.

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

## Related functions

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

  How many ways a whole number is a sum of distinct positive whole numbers.
- [integer_partitions](https://hilberon.com/library/integer_partitions)

  All the ways to write a whole number as a sum of positive whole numbers.
- [nth_prime](https://hilberon.com/library/nth_prime)

  The n-th prime, counting 2 as the first.
- [power_mod](https://hilberon.com/library/power_mod)

  A power modulo a number: base^exponent mod modulus.
- [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.

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