Left-Truncatable Prime Calculator
Primes
- Write out the truncation chain by deleting the leading digit each time: 3797, 797, 97, 7.
- A left-truncatable prime needs every entry of that chain prime, and no zero digit anywhere (a zero would leave a truncation with a leading zero).
- Checking each entry: prime at every step, so 3,797 is a left-truncatable prime.
- Only 4,260 left-truncatable primes exist in total - the largest has 24 digits - because the truncation tree dies out, unlike the primes themselves.
This left-truncatable prime calculator checks whether a number stays prime as you delete its leading digit one at a time. A left-truncatable prime contains no zero digit, and every step of its chain must be prime. Take 3797: deleting the leading digit gives 797, then 97, then 7, and all four numbers are prime, so 3797 qualifies. By contrast, 3796 fails immediately, because it is not prime itself. Enter a number and the calculator walks the whole chain for you, so you can see at a glance whether every truncation is prime or exactly where the chain breaks. It also lets you explore the full family: there are 15 left-truncatable primes up to 100 and only 4,260 in total, the largest having 24 digits.
The method behind the calculator is the accepted standard for this kind of calculation because it follows the definition of a left-truncatable prime directly: test the number, strip the leading digit, and repeat until a single digit remains, requiring a prime at every step and no zero anywhere in the number. That is why the family is finite, unlike the primes themselves: the truncation tree dies out. This page shows the formula, the step-by-step workings for each chain, worked examples such as 3797 and 3796, and the sources behind the counts, so you can check every result yourself rather than take it on trust.
Worked examples
Is 3797 left-truncatable?
(0 - test a single number · 3797)
| is 3,797 a left-truncatable prime? | Yes - every left truncation is prime |
| the truncation chain | 3797, 797, 97, 7 |
| number of digits (truncation steps) | 4 |
| chain verdict | prime at every step |
Is 3796 left-truncatable?
(0 - test a single number · 3796)
| is 3,796 a left-truncatable prime? | No - 3,796 itself is not prime |
| the truncation chain | 3796, 796, 96, 6 |
| number of digits (truncation steps) | 4 |
| chain verdict | fails at the first step |
Left-truncatable primes up to 100
(1 - list up to a limit · 100)
| left-truncatable primes up to 100 | 15 |
| the full list | 2, 3, 5, 7, 13, 17, 23, 37, 43, 47, 53, 67, 73, 83, 97 |
| largest in range | 97 |
| total that exist at any size | 4,260 - the family is finite |
What is a left-truncatable prime?
A left-truncatable prime is a prime number that survives losing its digits from the left, one at a time. Delete the leading digit and the remaining number must still be prime. Delete the next leading digit and that number must be prime too. Keep going until a single digit is left, and every number in that truncation chain must be prime. There is a second rule as well: the number cannot contain a zero digit anywhere. A zero would break the chain, because removing digits down to a zero would leave a leading zero—not a valid number—so any prime with a 0 in it is excluded from the family by definition.
The classic worked example is 3797. Its chain is 3797, 797, 97, 7, and each of those four numbers is prime. Nothing in 3797 is wasted: every step of the deletion is prime, which is exactly what left-truncatability demands. Now compare 3796. It fails immediately, before a single digit is removed, because 3796 is not prime itself. That shows the first test is always the number as written—the chain has to start out prime and stay prime all the way down. The no-zero rule is separate from the primality checks, and it applies to the number you begin with, not just to the shorter numbers later in the chain.
The size of this family is surprisingly small. There are 15 left-truncatable primes up to 100, and only 4,260 in total. The largest has 24 digits. That last figure is the striking one: the list does not go on forever. Unlike the primes themselves, which never run out, the left-truncatable primes form a finite family. The truncation tree dies out. Once you pass the largest member, no further number can satisfy the rule, no matter how many digits you add.
That finiteness follows from how the rule works. Every left-truncatable prime is built by adding digits to the front of a shorter left-truncatable prime, and each new number along the way has to be prime. The process can only continue while such extensions exist. At some point no leading digit produces a prime, the branches stop, and the tree has no more growth. The count of 4,260 and the 24-digit record are the visible result of that cutoff.
A calculator for this topic typically lets you test a number against the definition: it checks that the number has no zero digit, confirms the number is prime, and then strips leading digits one by one, verifying primality at each step until a single digit remains. If every check passes, the number is left-truncatable. If any step fails—whether the original number is composite, a zero appears, or a shortened form turns out composite—the chain breaks. The 3797 example shows a clean pass; 3796 shows an instant fail.
How the test works
To test whether a number is a left-truncatable prime, you work from the full number down. Delete the leading digit to form a new, shorter number, then test it for primality. Repeat that deletion until only a single digit remains. The number passes only if every number in that chain, including the original, is prime.
A worked example makes the rule concrete. Take 3797. Delete the leading 3 and you get 797, which is prime. Delete the leading 7 from 797 and you get 97, which is prime. Delete the leading 9 from 97 and you get 7, which is prime. The chain 3797, 797, 97, 7 is prime at every step, so 3797 is left-truncatable. Contrast that with 3796, which fails immediately: it is not prime itself, so there is no reason to continue deleting digits. The test checks the original number first, then each truncation in turn.
The rule also forbids any zero digit anywhere in the number. The reason is practical rather than arbitrary. Deleting a leading digit from a number like 107 would leave 07, which is really just 7 written with a leading zero. That is not a clean truncation of the original digits, and it would let numbers slip through on a technicality rather than on the strength of their digits. Excluding zero keeps every step of the chain an honest, same-length-minus-one truncation. A number containing a zero is therefore disqualified before the primality checks even begin.
Running the test across the whole number line shows how rare these numbers are. There are 15 left-truncatable primes up to 100, and only 4,260 in total. The largest has 24 digits. Unlike the primes themselves, which continue without end, the left-truncatable prime family is finite: the truncation tree dies out. Every branch eventually reaches a truncation that is composite or a leading zero, and no further digits can extend it.
In practice, a calculator can run the test quickly: check the number for prime status, scan its digits for a zero, then strip leading digits one at a time and test each result. A single composite or a single zero ends the test early. A number that survives every step is left-truncatable.
- Check the full number for primality first; if it is composite, stop.
- Scan every digit for a zero; a zero disqualifies the number.
- Delete the leading digit and test the result for primality.
- Repeat until one digit remains; all steps must be prime.
How many are there?
The left-truncatable primes are a small family. There are 15 left-truncatable primes up to 100, and only 4,260 in total. The largest has 24 digits. Those three numbers together describe the whole family: a handful of small examples, a few thousand in all, and a hard ceiling. Unlike the primes themselves, this family is finite — the truncation tree dies out.
The finiteness follows from the definition. A left-truncatable prime stays prime as you delete its leading digit one at a time, and it contains no zero digit. Every candidate must survive a whole chain of primality tests, one for each digit it has. As numbers get longer, that chain gets longer while the supply of numbers that pass every step thins out. Eventually no digit can be prepended to keep the chain alive, and the tree simply stops. The 24-digit record is where it stops.
The 15 left-truncatable primes up to 100 are the small end of the family. They are worth listing because the pattern is easy to see: each one is prime, and so is what remains after its leading digit is removed.
The best way to see the rule is to watch it succeed and watch it fail. 3797 is left-truncatable: its chain 3797, 797, 97, 7 is prime at every step. Four digits, four primes, no gaps. Now take 3796. It fails immediately — it is not prime itself, so there is no chain to test. That is the whole test: check the number, then check it with the leading digit gone, and keep going until a single digit remains. One failed step is enough to disqualify the number.
The counts are what make this calculator's subject unusual. There are 15 left-truncatable primes up to 100, and only 4,260 in total, the largest having 24 digits. A search that runs past 24 digits will not find a new record, because none exists. The table below shows the 15 small ones; the remaining members of the family are longer and are found by extending the same chain rule digit by digit.
| Left-truncatable prime (up to 100) |
|---|
| 2 |
| 3 |
| 5 |
| 7 |
| 13 |
| 17 |
| 23 |
| 37 |
| 43 |
| 47 |
| 53 |
| 67 |
| 73 |
| 83 |
| 97 |
Left vs right truncatable primes
A left-truncatable prime and a right-truncatable prime are built on the same basic idea — delete digits one at a time and check that what remains is still prime — but they delete from opposite ends. A left-truncatable prime stays prime as you delete its leading digit one at a time, and it contains no zero digit. A right-truncatable prime works the other way: you remove the final digit repeatedly, and every shorter number left behind must also be prime. The direction sounds like a small detail, but it changes how the numbers behave and how you search for them.
Take 3797, a classic left-truncatable prime. Delete the leading digit and you get 797, which is prime. Delete again and you get 97, then 7 — and the chain 3797, 797, 97, 7 is prime at every step. Now compare 3796. It fails immediately, because it is not prime itself; no amount of truncating can rescue a number that does not start out prime. That first check is the same for both families: the full number has to be prime before any digit is removed.
The deeper contrast is in how the two families end. Unlike the primes themselves, the family of left-truncatable primes is finite — the truncation tree dies out. You can picture it as a branching structure that starts from the one-digit primes and grows by adding digits to the front, but the branches eventually stop producing primes. The counts show how sharply the family narrows: there are 15 left-truncatable primes up to 100, and only 4,260 in total, with the largest having 24 digits. So the entire list can, in principle, be written down and checked from start to finish.
That finiteness is the key point of comparison. The primes go on forever, but a rule that demands every shorter version of a number also be prime is far more restrictive, and both the left and right truncatable families are finite. Neither family can keep producing larger members indefinitely, because at some length the truncation tree dies out. The two families are mirror images in method — delete from the left versus delete from the right — yet they share the same fate: a complete, bounded collection rather than an endless sequence.
For anyone using a left-truncatable prime calculator, the practical lesson is to check both ends. A number may survive truncation from one side and fail from the other, and a number that is not prime to begin with, like 3796, fails before the process even starts. Testing the full number first, then removing digits one at a time from the chosen end, is the whole method — and the finite totals above are the reason a full search is even possible.
- Left-truncatable: delete the leading digit one at a time; no zero digit allowed. Example chain: 3797, 797, 97, 7.
- Right-truncatable: delete the final digit one at a time; every shorter number must stay prime.
- 3796 fails at once because it is not prime itself.
- Both families are finite: 15 left-truncatable primes up to 100, 4,260 in total, largest with 24 digits.
FAQs
Is 3797 a left-truncatable prime?
Yes. 3797 is a left-truncatable prime because removing digits from the left, one at a time, always leaves a prime. The sequence is 3797, then 797, then 97, and finally 7. Every one of those numbers is prime, so 3797 satisfies the left-truncatable rule.
How many left-truncatable primes exist?
There are exactly 4,260 left-truncatable primes in total. The family is finite, meaning the list ends and does not continue forever. Because the count is known and complete, a calculator can check any candidate against the full set rather than searching indefinitely.
What is the largest left-truncatable prime?
The largest left-truncatable prime has 24 digits. The full list of left-truncatable primes is known and complete, so this largest member is settled, not merely the biggest one found so far. No longer left-truncatable prime exists beyond it.
Why can't a left-truncatable prime contain 0?
A zero digit cannot appear in a left-truncatable prime. Deleting digits from the left would eventually leave a truncation with a leading zero, and a number with a leading zero is not a valid prime representation. So every truncation must avoid that problem, which rules out any 0 in the digits.
How many left-truncatable primes are below 100?
There are 15 left-truncatable primes below 100. Each one stays prime as you strip digits from the left, ending at a single-digit prime. This small count makes the low range easy to check by hand before trusting a calculator on larger inputs.
Is every truncatable prime also permutable?
No. Truncation tests ordered prefixes of the digit string, while permutation tests every rearrangement of the digits. The two families overlap but differ, so a number that survives truncation is not automatically permutable. Each property must be checked with its own rule.