Solution 1 (due to Dave D. Felicia).
Let f_n(x) = 1+x^2+x^4+...+x^(2n), so 10101...101 = f_n(10) for some integer n >= 1. Consider n to be odd. Since
f_n(x) = (1+x^2)(1+x^4+x^8+...+x^(2n-2)),
so f_n(x) has both 1+x^2 and 1+x^4+x^8+...+x^(2n-2) as factors. Moreover, f_n(x) is irreducible only if 1+x^4+x^8+...+x^(2n-2) = 1, or n = 1. This occurs if f_n(x) = 1+x^2.
Therefore f_n(10) is not a prime when n is odd except when it is 1+10^2 = 101. Next we consider n to be even. Since
f_n(x) = (1+x+x^2+...+x^n)(1-x+x^2-...+x^n),
so f_n(x) has both 1+x+x^2+...+x^n and 1-x+x^2-...+x^n as factors.
Therefore f_n(10) is not a prime when n is even.
In the end, 10101...101 is not prime except when it is 101.
Solution 2.
Let a_n = 101..01 (n 1's). It is easy to check that a_2 = 101 is a prime. If n = 2k and k > 1, then there are k copies of substrings 101 separated by 0's. Cleary a_n is divisible by 101. In fact a_n is 101 multiplied by a number with n 1's separated by the substring 000.
Therefore a_n is not a prime for even n except a_2 = 101.
Assume n = 2k+1. We will show that a_n is divisible by b_n = 111...11 (n 1's).
By the formula of the sum of a geometric series 1+x+x^2+...+x_m = [x^{m+1)-1]/(x-1),
a_n
= 1+10^2+...+10^(4k)
= [10^(4k+2)-1]/(100-1)
= [10^(4k+2)-1]/99
= [10^(2k+1)-1][10^(2k+1)-1]/99
and
b_n
= 1+10+...+10^(2k)
= [(10^(2k+1)-1]/(10-1)
= [(10^(2k+1)-1]/9.
Now
a_n/b_n
= [10^(2k+1)+1]/11
= 100...01/11 (2k 0's and 2 1's).
Since the sums of the digits in the odd and even positions of the numerator of a_n/b_n are both 1, so the
difference of the sums, 0, is divisible by 11. By the rule of divisibility of 11, the numerator is divisible by 11, the denominator. Hence a_n is not a prime for odd n.