Permutable Prime Calculator
Primes
- List every distinct permutation of the digits of 199: 199, 919, 991.
- Test each permutation for primality by trial division up to its square root.
- Every permutation is prime, so 199 is a permutable prime (an absolute prime).
- Digits containing an even digit or 5 can only work for the single digits 2, 3, 5, 7 - any longer number would permute to an even or 5-ending composite; the next permutable prime after 199 is 311.
The Permutable Prime Calculator checks whether a number is a permutable prime — also called an absolute prime — meaning a prime whose digits can be rearranged in any order and always give a prime. Enter a number and the calculator tests every distinct arrangement of its digits, reports whether each arrangement is prime, and tells you plainly whether the original number qualifies. For example, 199 is a permutable prime: its three distinct permutations, 199, 919 and 991, are all prime. But 23 is not one: its permutations are 23 and 32, and 32 is composite, so a single composite rearrangement is enough to rule it out. The calculator also shows the context that makes the answer meaningful: there are exactly 22 permutable primes up to 1,000, the largest being 991, and the next one after 199 is 311.
The method behind the calculator is the accepted standard for this kind of calculation because it follows the definition directly: generate every distinct digit arrangement and test each one for primality. It also reflects a basic structural fact. Beyond one digit, a permutable prime can only use the digits 1, 3, 7 and 9, because any even digit or 5 could be permuted into the units place and make the number composite. Testing each permutation against that rule is exactly what the definition demands, with no shortcuts that could change the result. This page shows the formula, step-by-step workings, worked examples and sources, so you can follow every step of the check yourself rather than trusting an unexplained verdict.
Worked examples
Is 199 a permutable prime?
(0 - test a single number · 199)
| is 199 a permutable prime? | Yes - every permutation of its digits is prime |
| distinct permutations of the digits | 3 |
| the permutations | 199, 919, 991 |
| next permutable prime after 199 | 311 |
Is 23 a permutable prime?
(0 - test a single number · 23)
| is 23 a permutable prime? | No - 32 is not prime |
| distinct permutations of the digits | 2 |
| the permutations | 23, 32 |
| next permutable prime after 23 | 31 |
Permutable primes up to 1,000
(1 - list up to a limit · 1000)
| permutable primes up to 1,000 | 22 |
| largest in range | 991 |
| the full list | 2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79, 97, 113, 131, 199, 311, 337, 373, 733, 919, 991 |
| single-digit permutable primes | 4 |
What is a permutable prime?
A permutable prime, also called an absolute prime, is a prime whose digits can be rearranged in any order and always give a prime. The idea is simple to state but strict in practice: it is not enough for one rearrangement of the digits to be prime, or even for most of them to be. Every distinct ordering of the digits has to land on a prime number. If even one rearrangement produces a composite number, the original number does not qualify.
The number 199 shows how this works. Its digits are 1, 9 and 9, and the distinct permutations are 199, 919 and 991. All three are prime, so 199 is a permutable prime. The repeated 9 means there are only three distinct arrangements rather than six, but each one passes the test. Compare that with 23. Its permutations are 23 and 32, and while 23 is prime, 32 is composite. One failing arrangement is all it takes, so 23 is not a permutable prime.
There is a built-in reason the digits are so restricted. Beyond one digit, a permutable prime can only use the digits 1, 3, 7 and 9, because any even digit or 5 could be permuted into the units place. A number ending in an even digit is divisible by 2, and a number ending in 5 is divisible by 5, so in either case one arrangement would be composite. That rule alone rules out most digits and explains why permutable primes thin out quickly as numbers grow.
The counts stay small. There are exactly 22 permutable primes up to 1,000, the largest being 991. The next one after 199 is 311. Those figures give a sense of the density: even within the first thousand numbers, only a couple of dozen survive the requirement that every rearrangement be prime.
To test a candidate yourself, list each distinct ordering of its digits, check whether every one is prime, and treat a single composite result as disqualifying. The 199 and 23 examples cover both outcomes: 199 passes on all three of its arrangements, while 23 fails on 32.
How the test works
The test starts from the definition. A permutable prime (also called an absolute prime) is a prime whose digits can be rearranged in any order and always give a prime. To check whether a number qualifies, the calculator first generates every distinct permutation of its digits, then tests each of those permutations for primality. The number passes only if every permutation is prime. One composite arrangement is enough to disqualify it.
The word "distinct" does a lot of work here. If a number has repeated digits, many rearrangements look different in the order you list them but produce the same number, so the calculator collapses them into a single candidate. A number like 199 shows the simpler case: its three distinct permutations are 199, 919 and 991, and all three are prime, which makes 199 a permutable prime. A number like 23 shows the failing case: its permutations are 23 and 32, and 32 is composite, so 23 is not one.
A quick digit check can rule many numbers out before any permutation is generated. Beyond one digit, a permutable prime can only use the digits 1, 3, 7 and 9, because any even digit or 5 could be permuted into the units place, and a number ending in an even digit or 5 is divisible by 2 or 5. That single rule explains why the search space stays small: numbers built from 0, 2, 4, 5, 6 or 8 never get past the first filter. The calculator still runs the full permutation test on the numbers that survive, since passing the digit filter does not by itself guarantee that every arrangement is prime.
The results are rare. There are exactly 22 permutable primes up to 1,000, the largest being 991. The next one after 199 is 311, so the gap between consecutive examples can be wide. Because every permutation must be checked, the test is exhaustive rather than a shortcut: it does not sample a few arrangements and assume the rest follow.
When you enter a number, the calculator lists the distinct permutations it found, marks each one prime or composite, and reports the verdict. If any arrangement fails, the number is not a permutable prime, and the failing permutation is shown so you can see exactly why.
Why the digits are restricted
The restriction on digits follows from a simple fact about place value. In any multi-digit number, one digit has to sit in the units place, and that digit decides whether the whole number is even or divisible by 5. If a permutable prime contained an even digit (0, 2, 4, 6 or 8), one of its rearrangements could place that digit at the end, making the number even and therefore divisible by 2. If it contained a 5, a rearrangement could end in 5, making the number divisible by 5. Either way, that rearrangement would be composite, so the original number could not be a permutable prime. That leaves only the digits 1, 3, 7 and 9, none of which forces divisibility by 2 or 5 when placed last.
This is why a multi-digit permutable prime can only be built from 1, 3, 7 and 9 — and why such numbers are so rare. The digit test removes most digits, but it does not guarantee anything. A number made only of 1, 3, 7 and 9 can still fail, because some rearrangement may be divisible by 3, 7, 11 or another prime. Every one of its permutations has to be checked, and a single composite rearrangement disqualifies the whole set. As numbers grow longer, the number of permutations grows quickly and so does the chance that at least one of them is composite. That is why permutable primes thin out fast as the digit count rises.
Small examples show both sides of the rule. 199 is a permutable prime: its three distinct permutations, 199, 919 and 991, are all prime. 23 is not one: its permutations are 23 and 32, and 32 is composite. Note that 23 also breaks the digit rule, since it contains a 2 that can be moved to the units place.
Up to 1,000 there are exactly 22 permutable primes, and the largest is 991. The next one after 199 is 311. The full list appears in the table below.
When you use a permutable prime calculator, this digit restriction is the first filter it applies. Any candidate containing an even digit or a 5, beyond the single-digit primes, can be set aside immediately, which is why the search is so short up to 1,000.
| # | Permutable prime |
|---|---|
| 1 | 2 |
| 2 | 3 |
| 3 | 5 |
| 4 | 7 |
| 5 | 13 |
| 6 | 17 |
| 7 | 31 |
| 8 | 37 |
| 9 | 71 |
| 10 | 73 |
| 11 | 79 |
| 12 | 97 |
| 13 | 113 |
| 14 | 131 |
| 15 | 199 |
| 16 | 311 |
| 17 | 337 |
| 18 | 373 |
| 19 | 733 |
| 20 | 919 |
| 21 | 937 |
| 22 | 991 |
Permutable, circular and truncatable primes
A permutable prime, sometimes called an absolute prime, is a prime whose digits can be rearranged in any order and still give a prime. The definition covers every possible ordering of the digits, not just a few of them. Take 199: its three distinct permutations are 199, 919 and 991, and all three are prime. Now take 23. Its permutations are 23 and 32, and 32 is composite, so 23 is not a permutable prime. The difference between these two examples is the whole idea behind the family: one bad rearrangement is enough to disqualify a number.
This is where readers most often mix up prime families. A circular prime only requires that the rotations of its digits be prime. Rotations keep the digits in the same cyclic order and simply move the starting point, so 199 rotated gives 199, 991 and 919. A permutable prime goes further: every arrangement counts, including ones that scramble the order entirely. Every permutable prime is circular, but a circular prime is not automatically permutable, because rotations are only a small subset of all the ways to rearrange digits.
Truncatable primes are a different branch altogether. A truncatable prime stays prime as you remove digits from one end, one at a time, rather than as you reorder the digits you already have. Nothing about truncation requires the digits to survive rearrangement, and nothing about permutation requires a number to survive digit removal. The two properties can coincide by accident, but neither implies the other, so the names should not be used interchangeably.
The digit rules make the permutable family easy to recognize. Beyond one digit, a permutable prime can only use the digits 1, 3, 7 and 9. The reason is simple: any even digit or a 5 could be permuted into the units place, and a multi-digit number ending in an even digit or 5 is composite. That rule alone eliminates most candidates before any primality testing begins.
The family is also small. There are exactly 22 permutable primes up to 1,000, and the largest of them is 991. The next one after 199 is 311. Those figures are a useful reality check when you are scanning a list of candidates: the permutable prime is a rare find, and a number that passes the digit test still has to survive every rearrangement before it earns the name.
- Permutable prime: every rearrangement of the digits must be prime. Example: 199, 919 and 991 are all prime.
- Circular prime: only the rotations of the digits must be prime, a narrower requirement than full rearrangement.
- Truncatable prime: the number stays prime as digits are removed from one end, with no reordering involved.
- Beyond one digit, only the digits 1, 3, 7 and 9 can appear, since an even digit or 5 could be moved to the units place.
FAQs
What is a permutable prime?
A permutable prime is a prime number such that every permutation of its decimal digits is also prime. For example, rearranging the digits in any order must always produce another prime. These numbers are also called absolute primes. The definition concerns distinct arrangements of the same digits, so repeated digits count only once.
Is 199 a permutable prime?
Yes. The distinct permutations of the digits 1, 9 and 9 are 199, 919 and 991, and all three are prime. Because every arrangement of its digits is prime, 199 qualifies as a permutable prime. Repeated digits such as the two 9s are not counted as separate arrangements.
Is 23 a permutable prime?
No. The digits 2 and 3 can be rearranged to form 32, which is composite, so 23 fails the definition. A permutable prime requires every permutation of its digits to be prime, and one composite arrangement is enough to disqualify the number. Even though 23 itself is prime, that alone is not sufficient.
How many permutable primes are there up to 1,000?
There are 22 permutable primes up to 1,000, running from 2 up to 991. This count includes every prime whose digit permutations are all prime within that range. The list begins with the single-digit primes and extends to 991, which is the largest permutable prime below 1,000.
What is the next permutable prime after 199?
The next permutable prime after 199 is 311. Its digits 3, 1 and 1 can be arranged as 311, 131 and 113, and all three are prime. So 311 satisfies the definition just as 199 does. It comes next in the sequence of permutable primes following 199.
Can a permutable prime contain the digit 5?
Only the single-digit prime 5 itself can. In any longer number containing a 5, one permutation would place the 5 in the units position, making the number end in 5 and therefore divisible by 5. That arrangement would be composite, so no permutable prime with more than one digit can include the digit 5.