Finding number of primes of the form $1010\ldots 101$ (in base 10)

222 Views Asked by At

How many primes among the positive integers, written as usual in the base $10$, are such that their digits are alternating $1$’s and $0$’s, beginning and ending with $1$?

1

There are 1 best solutions below

0
On BEST ANSWER

The only answer is $101$

Proof:

Let $T_n$ be the number based on the number of ones. Then $$ T_0 = 0, T_1 = 1, T_2=101, T_3 = 10101 ~~~\text{etc} $$ Note that $$ T_{n+1} = 100 T_n + 1 $$ and hence $$ T_n =\frac{100^n-1}{99} $$ We can write $T_n$ as $$ T_n = \frac{\left(10^n\right)^2-1}{99} = \frac{(10^n-1)\,(10^n+1)}{99}$$

Thus the $T_n$ is composite except when $10^n-1 = 99$, i.e when $n=2$.

Hence the only prime is $101$