# Category:Ntheory

From Rosetta Code

**Library**

This is an example of a library. You may see a list of other libraries used on Rosetta Code at Category:Solutions by Library.

ntheory is Perl module available on CPAN as ntheory or Math::Prime::Util. It adds fast integer number theory functions using either GMP, C, or pure Perl.

Highlights include:

- Generating and iterating over primes or composites

- Fast primality tests for both small and large integers

- Primality proofs including BLS75 and ECPP

- Primality certificate verification

- Random primes and random provable primes

- Integer factoring and DLP

- Fast prime counts and nth prime using LMO

- prime count and nth prime approximations and bounds

- Simple partition, divisor, combination, and permutation iterators

## Pages in category "Ntheory"

The following 108 pages are in this category, out of 108 total.

### A

### C

### F

### M

### P

- Palindrome dates
- Parallel calculations
- Partition an integer x into n primes
- Pascal's triangle
- Perfect numbers
- Perfect totient numbers
- Permutations
- Permutations with some identical elements
- Permutations/Derangements
- Permutations/Rank of a permutation
- Pernicious numbers
- Pi
- Pierpont primes
- Pisano period
- Power set
- Primality by Wilson's theorem
- Prime conspiracy
- Prime decomposition
- Primes - allocate descendants to their ancestors
- Primorial numbers
- Proper divisors

### S

- Safe primes and unsafe primes
- Semiprime
- Sequence of primorial primes
- Sequence: nth number with exactly n divisors
- Sequence: smallest number greater than previous term with exactly n divisors
- Sequence: smallest number with exactly n divisors
- Sexy primes
- Sierpinski pentagon
- Smarandache prime-digital sequence
- Smith numbers
- Square-free integers
- Stern-Brocot sequence
- Strong and weak primes
- Subset sum problem
- Successive prime differences
- Sum digits of an integer
- Sum of divisors
- Superpermutation minimisation