Fix any $N$ a prime with decimal expansion $j_1j_2\dots j_k$.

My question: why can't every concatenation of $N$ onto itself be prime? That is, why can't the set containing $$N$$ $$j_1j_2\dots j_k j_1j_2\dots j_k$$ $$j_1j_2\dots j_k j_1j_2\dots j_k j_1j_2 \dots j_k$$ $$\vdots$$ contain only prime numbers?

Now, my question assumes such a set must contain composite numbers. I don't actually know this, I just figure that it must be true, otherwise someone would have already done it. My initial thought was to write this out in scientific notation and work from there, but given $N$ can have arbitrarily many digits, this is either a dead-end or would be too messy a solution to properly enjoy.

Example of such a set: $\{ 97, 9797, 979797 \dots \}$

  • 3
    $\begingroup$ All the entries of $[97,9797,979797,\dots]$ are divisible by $97.$ $\endgroup$ Feb 2, 2020 at 22:55
  • 2
    $\begingroup$ Indeed this "concatenating" of a prime number's decimal expansion will never" produce a prime number, much less *always do so. $\endgroup$
    – hardmath
    Feb 2, 2020 at 22:59

2 Answers 2



$9797=97\times101$, so $9797$ is not prime.

$979797=97\times10101$, so $979797$ is not prime.



take the sum of digits of said prime to be $d$ then concatenating the digits 3 times we have a digit sum $3d$ which shows by divisibility criterion that the new number is divisible by 3.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .