Ignoring sequences that are always factorable such as starting with 11, Can we take any other number such as 42 and continually append 1s (forming the sequence {42, 421, 4211, ...}) to get a sequence that has an infinite number of primes in it?

  • 25,533
  • 7
  • 83
  • 140
  • 405
  • 1
  • 3
  • 8
  • In other words, does the sequence $a_n = 10^n m + (10^n-1)/9$, $n=1,2,3,\dots$, $m\in\mathbb{N}$ contain an infinite number of primes. This is from using the geometric sum formula. Using this, the question can be posed in arbitrary number base instead of just decimal. – anon Jul 13 '11 at 05:51
  • 1
    No reason to ignore stuff that begins with $11$. It is not known whether there are infinitely many primes of the shape $111 \dots 11$. It is the only problem in the family of problems you mention that has a fairly big literature. Numbers of shape $111\dots 11$ are called *repunits*. My feeling is that any of your questions, like the one about stuff that starts with $42$, is exceedingly difficult. – André Nicolas Jul 13 '11 at 06:13
  • @user6312 Oops, I somehow thought that all repunits were composite. How wrong I am. – Paul Jul 13 '11 at 06:24

3 Answers3


I think this is an open question. Lenny Jones gave a talk in which he noted that the numbers 12, 121, 1211, 12111, 121111, etc., are all composite - until you get to the one with 138 digits, that's a prime.

Jones' work appears in the paper, When does appending the same digit repeatedly on the right of a positive integer generate a sequence of composite integers?, Amer. Math Monthly 118 (Feb. 2011) 153-160. He finds that 37 is the smallest positive integer such that you get nothing but composites by appending any positive number of ones. It seems to be easier to find a sequence with no primes than a sequence which you can prove has infinitely many.

Gerry Myerson
  • 168,500
  • 12
  • 196
  • 359
  • So Jones' work gave any mathematical proof? Actually I didn't able to read his article as it is not free. Any other link of his will be helpful for me to know more about this. – Adarsh Kumar Dec 23 '18 at 15:35
  • Yes, Jones' paper gave a proof. Maybe there's a copy of the paper at his website, or on arXiv. – Gerry Myerson Dec 23 '18 at 15:37
  • Lenny Jones doesn't have his own Wikipedia page. What you say? How can I get to know about him ? – Adarsh Kumar Dec 23 '18 at 15:42
  • Wikipedia is not the sum total of the internet. Lenny probably has a homepage you can find by searching. Or, you can try typing the title of the paper (or some chunk of it) into Google to see whether anything comes up. – Gerry Myerson Dec 23 '18 at 15:48
  • https://cs.uwaterloo.ca/journals/JIS/VOL14/Jones/jones12.pdf may be useful. Also, pseudoprime.com/amer.math.monthly.121.05.416-wagon.pdf – Gerry Myerson Dec 24 '18 at 03:55

Unless prevented by congruence restrictions, a sequence that grows exponentially, such as Mersenne primes or repunits or this variant on repunits, is predicted to have about $c \log(n)$ primes among its first $n$ terms according to "probability" arguments. Proving this prediction for any particular sequence is usually an unsolved problem.

There is more literature (and more algebraic structure) available for the Mersenne case but the principle is the same for other sequences.


Bateman, P. T.; Selfridge, J. L.; and Wagstaff, S. S. "The New Mersenne Conjecture." Amer. Math. Monthly 96, 125-128, 1989

  • 34,340
  • 3
  • 43
  • 106

So it can't be true or can't be even false. As we know that primes gaps increases when we see large prime numbers. It is true there are infinitely many primes but these gaps really create the trouble to verified whether these types of prime numbers may exist. Let take an example let n=3 so the sequence will run like

(31, 311, 3111, 31111,...) in this sequence every third term will divisible by 3 and if we go higher the prime gaps increases but as we know the sequence is infinite and following a pattern then it can hit some prime numbers also, by this assumption we can state yes prime numbers like do exist till infinity.

In my knowledge I don't know any mathematical way to proof it except this above hypothesis.

Adarsh Kumar
  • 121
  • 5
  • 17