# Problem relating to primes and sequences

Prove/Disprove that there exist positive integers $a$ and $N$ such that the sequence $\overline{N}, \overline{aN}, \overline{aaN}, \overline{aaaN}, \ldots$ contains infinitely many primes.

($\overline{xy}$ refers to concatenating the digits of $x$ and $y$)

This problem was thrown around a maths chat. We ran some computer programs use Miller-Rabin primality test on Python and we got some sequences which seemed to keep having primes (such as $a=2$, $N=3$), and others which we could easily mod-bash to see only have finitely many primes (such as $a=5$, $N=37$).

We couldn't determine whether it would always be the case that there are finitely many primes, or whether $a=5$, $N=37$ was an exception.

EDIT: After a bit more thought, we started considering what sort of conditions would be sufficient for such a sequence to only contain finitely many primes.

There are some obvious ones like $N$ even or divisible by $5$, as well as $p \mid a, N$ for odd primes $p$. However, these don't cover the example of $a=5$, $N=37$.

Are there any more sufficient conditions?

• There are odd values of $b$ such that $2^n+b$ is composite for all $n$. Such $b$ are usually found by using "covering congruences". A similar approach may work for this question. – Gerry Myerson Feb 4 '18 at 8:09
• Have you had a chance to follow up on this, Sharky? – Gerry Myerson Feb 5 '18 at 22:58
• No, not yet. I'll get a chance probably at the end of this week due to personal things. – Sharky Kesa Feb 6 '18 at 3:14
• the article on wikipedia about repunits en.wikipedia.org/wiki/Repunit seems related (to the edited part of the above question), e.g. there is only one base 8 repunit prime, 73. Also, primes.utm.edu/glossary/xpage/Repunit.html – Mirko Feb 22 '18 at 1:17

Here's another formulation: Does $a\frac{10^{nd}-1}{10^d-1}+b,n\in \mathbb N$ contain infinitely many primes?
This looks a lot like Mersenne primes except base $10$ instead of $2$. Since no one knows if there are infinitely many Mersenne primes I'd expect this to be very hard to prove either way.