While messing around, I noticed that across some prime numbers contain only sequentially increasing digits, e.g. $23, 67, 89,23456789$.

If we adopt a convention of returning to $1$ after a $9$, we can find some other primes, e.g. $67891,4567891,56789123,1234567891,4567891234567$.

Is there a name for prime numbers of this kind? Is it known if there are an infinite number of primes having this form?


Gerry Myerson below pointed me to a related OEIS sequence. This is different from the sequence above in that it returns to 0 after a 9, as opposed to 1 as outlined above. In hindsight, this seems like a more natural definition than mine.

These have been referred to as 'consecutive digit primes' in the literature. There is some literature published on this notably J. S. Madachy, Consecutive-digit primes - again, J. Rec. Math., 5 (No. 4, 1972), 253-254. But this doesn't seem to have been digitised yet.

I also found this yahoo question. Over there a user finds a 658-digit consecutive digit prime. The user that found this conjectured that there were a finite number of such primes. There is also a related question from here on stackexchange, which asks if there are any such consecutive digit primes with a first digit of 1, which there are.

  • 2
    $\begingroup$ The numbers are tabulated at oeis.org/A006055 and some references are given. Why not have a look at them, and then report back to us? $\endgroup$ – Gerry Myerson Aug 20 '14 at 7:21
  • 1
    $\begingroup$ Off-topic but FYI: the $286$-digit sequence$$123456789123456789\cdots1234567$$is a concatenation of seven primes. $\endgroup$ – David Aug 20 '14 at 7:28
  • $\begingroup$ Have you had a look at those references, user? $\endgroup$ – Gerry Myerson Aug 21 '14 at 9:50
  • $\begingroup$ @GerryMyerson, thanks for following up---I appreciate the guidance. I tried to find those references online, but couldn't. They are all from the 70s, so I presumed that maybe they hadn't been digitized yet. I had an idea, though. For all numbers consisting of $n$ digits, there are at most 4 consecutive digit primes, since the last digit must be $1,3,7$ or $9$. The number of $n$ digit primes, in the limit of large $n$, should scale as $\frac{9\times 10^n}{\ln 10^n}$, by the prime-number theorem. Thus we might expect that the asymptotic density of consecutive digit primes to go to zero. $\endgroup$ – user105475 Aug 21 '14 at 10:58
  • $\begingroup$ Well, the asymptotic density of consecutive digit numbers, prime or otherwise, goes to zero pretty fast. And interlibrary loan is a way to get old papers. $\endgroup$ – Gerry Myerson Aug 21 '14 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy