Recently I came across this beautiful question: Deleting any digit yields a prime... is there a name for this?
The question talks about primes that remain prime when any one of their digits is deleted (zeros allowed). The answers there claim that there is only a finite number of such primes. So naturally I started wondering what is the largest such prime?
According to A051362 the largest known prime with this property is 9977770001777. Can we find a larger one?
I searched for primes in the form $aa \ldots aabb \ldots bb$, where $a$ and $b$ are digits in $\{1,3,7,9\}$ and there are up to $n \leq 400$ of each one. But I couldn't find any solutions other than the trivial small ones.
About $8$ years ago, not too long after the linked question was asked, Code Golf StackExchange took up the challenge. The winning answer found a $274$-digit solution: $$\underbrace{444\dots 44}_{163} \underbrace{000 \dots 00}_{80} \underbrace{111\dots 11}_{31}$$ This outdoes my own searches considerably. The largest solution I've personally found is the following $84$-digit number, which is the second-largest solution found there: $$\underbrace{444\dots 44}_{50} \underbrace{111 \dots 11}_9 \underbrace{333\dots 33}_{25}$$ It makes sense to test numbers with only a few blocks of consecutive repeated digits: then there's only a few digit deletions to check, so it's more likely that all digit deletions will remain prime. The search I did included:
Here's a rough probabilistic analysis of how likely such numbers are to have the property we want. There are $9^k \binom{n-1}{k-1}$ distinct numbers with $n$ digits divided into $k$ blocks of digits (like the above has $16$ digits divided into $4$ blocks). Very loosely, this is $9^k \cdot \frac{n^{k-1}}{(k-1)!}$. The probability that a random $n$-digit number is prime is roughly $\frac1{n \ln 10}$. Initially, I estimated that for an $n$-digit number and all $k$ possible digit-deletions to be prime, you pay a factor of $\frac1{(n \ln 10)^{k+1}}$. So we get a probability of $O\Big((\frac{9}{\ln 10})^k \cdot \frac1{(k-1)!} \cdot n^{-2}\Big)$ that there is any solution with $n$ digits and $k$ blocks. The part depending on $k$ is maximized when $k$ is around $4$.
However, looking at the numbers modulo small primes like $2$, $3$, or $5$, there's some correlation. Some of the correlation helps us (spot-checking primes using the last digit) and some hurts us on net (divisibility by $3$ enforces that either digits $1 \bmod 3$ or digits $2 \bmod 3$ must be missing from the number). It's hard to say what the best value of $k$ is, just that it should not grow with $n$.
I've also limited the number of blocks for practical considerations. Even if it turns out that $k=5$ is abstractly more promising than $k=4$, numbers with $5$ blocks will be at least an order of magnitude less likely to result in all the primes we want - there will just be more of them to compensate. So it will take longer to find such solutions.