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, ...
Only 101 can be prime, in any number base, though not all. In any base, such a number with k ones is
1010..101 = 100^(k-1) +100^(k-2)+...+100+1 =
(100^k-1)/(100-1) = (10^2k-1)/(10^2-1) =
(10^k+1)(10^k-1)/((10+1)(10-1))
If, after dividing by the denominator, there still remain two factors in the numerator, the number won't be a prime.
If k=1, we get 1, which isn't very interesting.
For k=2, the fraction simplifies to 101, which may or not be a prime, depending on the number base.
And for k>2, no term is cancelled out, and the number is always composite.
|
Posted by e.g.
on 2004-02-18 15:25:11 |