1, 101, 10101, 1010101, 101010101, 10101010101, 1010101010101, 101010101010101, 10101010101010101, 1010101010101010101, 101010101010101010101, 10101010101010101010101, 1010101010101010101010101, 101010101010101010101010101, 10101010101010101010101010101
This is the sequence A094028 of the On-Line Encyclopedia of Integer Sequences (OEIS). According to a comment from Felix Fröhlich on the sequence’s page:
101 is the only term that is prime, since (100^k-1)/99 = (10^k+1)/11 * (10^k-1)/9. When k is odd and not 1, (10^k+1)/11 is an integer > 1 and thus (100^k-1)/99 is nonprime. When k is even and greater than 2, (100^k-1)/99 has the prime factor 101 and is nonprime.
Felix Fröhlich, Oct 17 20151
It isn’t particularly striking that it should be the case. Let’s see why 101 is the only prime number of the sequence.
The sequence
First of all, let’s study a bit more the sequence. Let’s call
For the first few elements we have:
We can see that we can write the sequence as
For example, for the first element we have
Similarly, for
A simpler form
For the
We would like to remove some of terms, let’s consider
This sequence has many similar terms to
We can cancel the common terms, we end up with:
To find out what
So, we have:
Cleaning things a bit
We can rewrite
We now have a difference of squares, we can factorize it further:
To make it a bit simpler to work with, let’s do a little variable substitution with
Therefore,
Okay, now we can write the
First of all, we can see that
We can split the
We can do the same for the
We can cancel out the
Division by 11
Let’s take a small break from our sequence to discuss the divisibility by 11. For a number
A number in decimal base can be expressed as
Note that
So,
Since
So, we can rewrite
Since we want to check if
So,
The proof
Now that we know that when a number is divisible by
is even
First, let’s suppose that
Now, let’s use the variable
For
Thus, we can deduce that
Posing
Since
is odd
We can use a similar trick for any even
The remaining cases
This leaves us with two cases,
References
-
OEIS. Sequence A094028, https://oeis.org/A094028 ↩