How many primes among the positive integers, written as usual in base 10, are alternating 1's and 0's, beginning and ending with 1?

Solution:

A simple check shows that 101 is prime.

Let a be a positive integer such that a written in base 10 is alternating 1's and 0's, beginning and endind with 1. Let n be the

number of 1's in a. Clearly, if n is even, then a is divisible by 101. Therefore, we may assume that n is odd. Let n=2k+1.

If n>3, then a is divisible by 111...1 ( n 1's ). Furthermore,

a=101010101....1 (n 1's) = 1111...1 ( n 1's ) x 9090909...0909091 ( k 9's)

To prove that, use the induction. Here we illustrate by showing the case n=7.

1111111 x 909091=(1100000+11111)(900000+9091)=11111 x 9091+1111111 x 900000 + 1100000 x 9091=

( the inductive step)

101010101+100000(9999999+100001)=101010101+100000x101x100000=1010101010101=a.

Therefore, there is only one prime that alternates 1's and 0's, 101.