# Primeval number

In mathematics, a primeval number is a natural number n for which the number of prime numbers which can be obtained by permuting some or all of its digits (in base 10) is larger than the number of primes obtainable in the same way for any smaller natural number. Primeval numbers were first described by Mike Keith.

The first few primeval numbers are

1, 2, 13, 37, 107, 113, 137, 1013, 1037, 1079, 1237, 1367, ... (sequence A072857 in OEIS)

The number of primes that can be obtained from the primeval numbers is

0, 1, 3, 4, 5, 7, 11, 14, 19, 21, 26, 29, ... (sequence A076497 in OEIS)

The largest number of primes that can be obtained from a primeval number with n digits is

1, 4, 11, 31, 106, ... (sequence A076730 in OEIS)

The smallest n-digit prime to achieve this number of primes is

2, 37, 137, 1379, 13679, ... (sequence A134596 in OEIS)

Primeval numbers can be composite. The first is 1037 = 17×61. A Primeval prime is a primeval number which is also a prime number:

2, 13, 37, 107, 113, 137, 1013, 1237, 1367, 10079, ... (sequence A119535 in OEIS)

The following table shows the first six primeval numbers with the obtainable primes and the number of them.

Primeval number Primes obtained Number of primes
1 none 0
2 2 1
13 3, 13, 31 3
37 3, 7, 37, 73 4
107 7, 17, 71, 107, 701 5
113 3, 11, 13, 31, 113, 131, 311 7