Saturday, November 5, 2011

Friday, November 4th

Problem 
Consider $p=1010..101$ where there are $n$ 1's and $(n-1)$ 0's. Find all possible $n$ such that $p$ is prime.


Solution 

Notice that $p=\frac{10^{2n}-1}{99}$. Thus $p=\frac{1}{9\times 11}(10^n-1)(10^n+1)$. For $n>2$ and $n$ even, $99| 10^n-1$ and $10^n-1>99$, hence $p$ cannot be prime. For $n$ odd, $9|10^n-1$ and $11|10^n+1$ and $10^n-1>9$ and $10^n+1>11$. Hence the only solution is $n=2$ and $p=101$.

No comments:

Post a Comment