Can it be shown that for numbers $n_L$ of the form 166...661 of length L, if $n_L$ is prime then $L$ is prime?

61 Views Asked by At

The first 8 primes of the form 166...661 have lengths 5, 13, 17, 19, 37, 53, 73, and 101. It is always the case if a number of this form is prime then its length also must be prime?

2

There are 2 best solutions below

2
On BEST ANSWER

According to The On-Line Encyclopedia of Integer Sequences,

the next (probable) prime of that form has $6233$ digits,

and $6233=23×271$.

2
On

If $n$ is even, the number is divisible by $11$.
If $n$ is odd and divisible by $3$, the number is divisible by $7$.
That leaves $33$ possible $n$, of which $24$ are prime.
If you picked eight of the 33 at random, you would have $5.3\%$ chance of getting all prime. Can you get some more data ?