# partitions_q function

How many ways a whole number is a sum of distinct positive whole numbers.

## How to write it

### partitions_q(n)

**n**

A whole number. Takes a whole number.

## Examples

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

  `partitions_q(10)`

  In the solver, `partitions_q(10)` gives `10`.

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

## Related functions

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

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

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

  A power modulo a number: base^exponent mod modulus.
- [previous_prime](https://hilberon.com/library/previous_prime)

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

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

  How many distinct primes divide a whole number.

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