Primality of the number of obtained by concatenating the n consecutive digits

368 Views Asked by At

Let $f_n$ be the number obtained by concatenating the first $n$ numbers (in base 10). For example

$f_1 = 1, f_3 = 123$ and $f_{13} = 12345678910111213.$

Now if $n$ is even or divisible by $5$ then so is $f_n$ and if $n(n+1) \equiv 0 \pmod{3}$ then $f_n$ is divisible by $3.$ My question is

Is $f_n$ always composite?

Verifying the question with a computer I get that it holds for $n$ up to $1000$ but I don't see how to prove it.

It does not seem to be case that $f_n$ always has small prime divisors as for example $f_7 = 127 \cdot 9721.$

Hence I don't see any simple approach to this question.

2

There are 2 best solutions below

0
On BEST ANSWER

This concatenation is A007908 in the OEIS, where you can see that Charles Nicol and John Selfridge ask the same question in

R. K. Guy, Unsolved Problems in Number Theory, A3.

There are no primes in the first 5000 terms of the sequence, but heuristics suggest that there are infinitely many. In particular, there 'should' be about

$$\frac{\log\log n-\log\log m}{2}$$

primes between $m$ and $n$. This suggests that there should be about one prime with index between 5000 and

$$\exp(\exp(\log(\log 5000)+2))\approx2\cdot10^{27}$$

Edit: I have just checked the first 20,000 terms without finding a prime. This expands the previous interval to $6\cdot10^{31}$.

0
On

As in the middle of November $2015$,there are no primes in the first $269293$ terms (!!), and it's very likely also that there are no primes in the first $300000$ terms. See the great Smarandache probable prime search managed by Serge Batalov. Update: As of 15 december 2015, there are no primes in the first $344869$ terms (the great Smarandache Prprime search).