I was recently coding a prime factorization function and wanted to test that it could factor large numbers reasonably well. Arbitrarily, I slid my finger across the number pad, and got 23456789 as a test input. Surprisingly, it was prime!
Was this just a strange coincidence, or is there any deeper number theoretic structure that leads to this result.
Past research: all I've been able to do is confirm that 23456789 is indeed prime and is the largest prime with digits in ascending order.
$\endgroup$ 123 Answers
$\begingroup$This is not an answer, but in base $n$ that number is $$ a_n=\frac{2n^{n-1}-n^{n-2}-n^2+n-1}{(n-1)^2}$$ Which is prime for $n=3,4,6,10,16,18,36$ and no other $n\leq 500$. $\sum_{n=3}^\infty \frac 1{\ln(a_n)}$ converges, so by a heuristic following from the prime number theorem this sequence probably has only finitely many primes.
$\endgroup$ 3 $\begingroup$COMMENT.-Here something I like and and maybe related to the problem proposed (note that with this definition the coefficient $a$ can be extended to be non-digit).
Define
$$P_n(x)=\sum_{2\le a\le n} ax^{n-a}$$
The polynomials $P_n(x)$ have degree $n-2$ and can be defined by recurrence via
$$P_{n+1}(x)=xP_n(x)+(n+1);\space P_2(x)=2$$ This way one has
$$P_9(10)=\color{red}{23456789}\\P_9(4)=50969,\text{ prime }\\P_9(2)=757,\text{ prime}$$ Besides with exception of $P_6$ for which $P_6(n)$ is composite for $1\le n\le 10$ one has the following primes for $1\le n\le 10$ $$\begin{cases}P_8(5)=43943\\P_8(3)=2729\\P_7(3)=907\\P_5(2)=41\\P_5(6)=569\\P_4(3)=31\\P_4(9)=193\\P_3(1)=5\\P_3(2)=7\\P_3(4)=11\\P_3(5)=13\\P_3(7)=17\\P_3(8)=19\\P_3(10)=23\\P_2(n)=2\text{ for all } n\end{cases}$$
$\endgroup$ 1 $\begingroup$As posed, I would say that the answer to your question is no.
Say we are given just a single positive integer $n$, in your question $n = 23456789$. In this case there is no "deep reason" for $n$ to be prime. Either $n$ is prime or not, it is what it is.
On the other hand, suppose we are given a random integer $1 \leq n \leq N$. Then it follows from PNT that the probability that $n$ is prime is approximately $1 / \log N$. In other words, it is very likely that $n$ is not prime.
It seems your question is motivated by the pattern in the base $10$ expansion of $n$, with increasing digits in base $10$. You could ask questions about the set of such integers (how likely are they to be prime, are there infinitely many primes of this form, etc.). But for a specific integer there is not really anything to say.
$\endgroup$