5

Form a sequence $(a_n)$ as follows: Let $a_1$ be any positive integer. Let $a_{n+1}$ be formed from $a_n$ by appending any decimal digit to the end of $a_1$. Determine, with proof, whether it is possible that $a_n$ is composite only finitely often (i.e. if there exists a value of $a_1$ that makes $a_n$ composite only finitely often).

  • The digits $0, 2, 4, 5, 6, 8$ can only be used finitely many times as otherwise one would get infinitely many composites.

  • The digits $1, 7$ can only be used finitely many times as, after we stop using $2, 5$ and $8$, they are the only ones to change the remainder modulo $3$ and both add $1$ to it (otherwise there would be infinitely many multiples of $3$).

  • Both $3$ and $9$ must be used infinitely many times because, if at some point a prime $p$ is reached, adding at most $p$ of the same digit yields another multiple of $p$.

Even with these restrictions the question seems very hard. For instance, the following are primes of length $9$: $1979339333, 1979339339$.

Alma Arjuna
  • 6,521
Fred Jefferson
  • 1,196
  • 5
  • 16
  • 1
    I assume that the second line should read "... to the end of $a_n$", right? And... what is the source of the problem? – Dr. Mathva Jul 24 '22 at 17:24
  • 2
    With a decent amount of work modulo $7$ (but without many new ideas), one can show that such an infinite sequence with finitely many primes must eventually be $5\pmod 7$ infinitely often, and the possible "moves" are adding $93$, $339$, or $9939$ (each of which preserves $5\pmod 7$-ness). Not sure this is actually helpful. – Carl Schildkraut Jul 24 '22 at 22:00
  • Do you mean "infinite many composites" instead of "infinite many primes" ? Since adding a digit different from $1,3,7,9$ leads to a composite. Hard to imagine that the number of composites can be finite. This would mean that there is a start value allowing ONLY primes. Maybe this can be even refuted, but it is at least very hard to imagine. – Peter Jul 28 '22 at 09:43
  • Related: https://en.wikipedia.org/wiki/Truncatable_prime – Alma Arjuna Feb 10 '24 at 20:37
  • Somewhat related, https://math.stackexchange.com/questions/3264921/extending-prime-numbers-digit-by-digit-while-retaining-primality – Gerry Myerson Feb 11 '24 at 03:12

1 Answers1

1

This is the problem Growing Primes #1 posed by Frank Rubin in his website.

A discussion about it (with no solution) may be found here.

As far as I am aware, there is no evidence anybody but Rubin was able to solve it, so you might want to ask him for his proof.

This article discusses the problem and suggests it might be open still.

Alma Arjuna
  • 6,521