A truncatable prime is a prime number that remains prime after successive removal of digits
from one fixed end of its decimal representation, down
to a single digit. A zerofree
number
is right truncatable if
and all numbers obtained by successively removing the rightmost
digits are prime. There
are exactly 83 right truncatable primes in base 10. The first few are 2, 3, 5, 7,
23, 29, 31, 37, 53, 59, 71, 73, 79, 233, 239, 293, 311, 313, 317, 373, 379, 593,
599, ... (OEIS A024770), the largest being
the 8-digit number
(Angell and Godwin 1977). The numbers of
-digit right truncatable primes for
, 2, ..., 8 are 4, 9, 14, 16, 15, 12, 8, and 5 (OEIS A050986;
Rivera puzzle 70).
Similarly, a zerofree number is left truncatable if
and all numbers obtained by successively removing the leftmost
digit are prime. There
are exactly 4260 left truncatable primes in base 10 when the digit zero is not allowed.
The first few are 2, 3, 5, 7, 13, 17, 23, 37, 43, 47, 53, 67, 73, 83, 97, 113, 137,
167, 173, ... (OEIS A024785), with the largest
being the 24-digit number
(Angell and Godwin 1977). The numbers
of
-digit
left truncatable primes for
, 2, ... 24 are 4, 11, 39, 99, 192, 326, 429, 521, 545, 517,
448, 354, 276, 212, 117, 72, 42, 24, 13, 6, 5, 4, 3, and 1 (OEIS A050987;
Rivera puzzle 70).
If zeros are permitted, leading zeros produced by truncation are ignored. The first few left truncatable primes in this convention are 2, 3, 5, 7, 13, 17, 23, 37, 43, 47, 53, 67, 73, 83, 97, 103, 107, 113, 137, 167, 173, 197, 223, 283, 307, ... (OEIS A033664).
The prime numbers having no proper subsequence of their decimal digits that represents another prime number form a finite set explicitly determined by Shallit (1999-2000). Every prime number contains one of these primes as a digit subsequence.
An -digit zerofree prime
(with
) is called a restricted left truncatable prime if
1. If the leftmost digit of is deleted, a prime number
is obtained for
, and
2. No prime with digits can have its leftmost digit removed to produce
.
Kahan and Weintraub (1998) dub such primes "Henry VIII primes." Restricted left truncatable primes are therefore a subset of left
truncatable primes for which there are no left truncatable primes of length
having the same
last digits as
. There are a total of 1440 such primes, and the first few
are 773, 3373, 3947, 4643, 5113, 6397, 6967, 7937, ... (OEIS A055521),
the largest being 357686312646216567629137 (Angell and Godwin 1977, Kahan and Weintraub
1998).
Truncatable primes are also called Russian doll primes.