How many primes, written in usual base 10, have digits that are alternating 1s and 0s, beginning and ending with one?
For example (not necessarily prime):
1, 101, 10101, ...
In general, we will consider this sequence:
F(N) = 101010........1 ( zeros)
Then, we have:
F(0) = 1, which is not a prime number.
F(1) = 101, which is a prime number.
Also, we must have:
F(N) = 1+100+100^2+ .......+100^N
100^(N+1) - 1 100^(N+1) - 1
= ---------------------- = ----------------------
100 - 1 99
100^(N+1) - 1 {10^(N+1) + 1}{10^(N+1) - 1}
Or, 99 = ------------------------ = ---------------------------------------------
F(N) F(N)
Since 10^(N+1) +1 and 10^(N+1) - 1 differ by 2, it follows that:
Either, F(N) divides 10^(N+1) + 1
Or, F(N) divides 10^(N+1) - 1
Since, the cases corresponding to N=0 and 1 are already accounted for:
We will now consider the cases when N>1
We observe that:
F(N) = 1+100+100^2 + ......+100^N
> 1+ 100^N = 1 + 10^(2N)
Since N>1, we must have: 2N > N+1
Therefore, F(N) > 1+10^(2N) > 1 + 10^(N+1)
Accordingly, F(N) does not divide 10^(N+1) +1, whenever N > 1
Since 10^(N+1) +1 > 10^(N+1) -1, it follows that:
F(N) > 10^(N+1) - 1, and accordingly F(N) does not divide 10(N+1) - 1, whenever N>1
This leads to a contradiction.
Accordingly, F(N) is NOT a prime number whenever N > 1
Consequently, 101 is the only possible prime number that satisfies all the given conditions.
Edited on August 27, 2022, 5:43 am