Find all natural numbers $n$ for which every natural number whose decimal representation has $n-1$ digits $1$ and one digit $7$ is prime.
Problem
Source:
Tags:
25.05.2007 03:24
It is clear that $n=1$ satisfies the requirement. We will show that there are no other such $n$. Assume that $n>1.$ Number whose decimal representation has n-1 digits 1 and one digit 7 is of the form $\frac{10^n-1}{9} + 6\cdot 10^k$ where $0\leq k\leq n-1.$ We need to find such $n$ that $\frac{10^n-1}{9} + 6\cdot 10^k$ is prime for every $k=0,1,\dots,n-1.$ Note that unless $\frac{10^n-1}{9}$ is divisible by 7, there exists $k_0$ such that $\frac{10^n-1}{9} + 6\cdot 10^{k_0}$ is divisible by 7 (thus, is not prime). On the other hand, if $\frac{10^n-1}{9}$ is divisible by 7 then $n$ is divisible by 6, implying that $\frac{10^n-1}{9} + 6\cdot 10^k$ is divisible by $3$ (for any $k$). Therefore, there are no other $n$ for which $\frac{10^n-1}{9} + 6\cdot 10^k$ is prime for every $k=0,1,\dots,n-1.$
14.08.2007 00:19
maxal wrote: It is clear that $ n=1$ satisfies the requirement. We will show that there are no other such $ n$. Assume that $ n>1.$ Number whose decimal representation has n-1 digits 1 and one digit 7 is of the form $ \frac{10^{n}-1}{9}+6\cdot 10^{k}$ where $ 0\leq k\leq n-1.$ We need to find such $ n$ that $ \frac{10^{n}-1}{9}+6\cdot 10^{k}$ is prime for every $ k=0,1,\dots,n-1.$ Note that unless $ \frac{10^{n}-1}{9}$ is divisible by 7, there exists $ k_{0}$ such that $ \frac{10^{n}-1}{9}+6\cdot 10^{k_{0}}$ is divisible by 7 (thus, is not prime). On the other hand, if $ \frac{10^{n}-1}{9}$ is divisible by 7 then $ n$ is divisible by 6, implying that $ \frac{10^{n}-1}{9}+6\cdot 10^{k}$ is divisible by $ 3$ (for any $ k$). Therefore, there are no other $ n$ for which $ \frac{10^{n}-1}{9}+6\cdot 10^{k}$ is prime for every $ k=0,1,\dots,n-1.$ Something is wrong with this, as $ 17$ and $ 71$ are both primes. And obviously the problem is that $ 3 \nmid \frac{10^{n}-1}{9}$, unless $ 3 \mid n$.
10.11.2007 00:35
My original proof does not work if $ k_0\geq n$, in which case $ \frac {10^{n} - 1}{9} + 6\cdot 10^{k_{0}}$ contains $ k_0 + 1 > n$ digits. By the definition of $ k_0$, we have $ k_0 < 7$, implying that cases $ n < 7$ have to be verified separately: for $ n = 2$, $ k_0 = 4$ and here we have primes $ 17$ and $ 71$ as pointed out by s.tringali; for $ n = 3$, $ k_0 = 3$ but here $ 117$ is not prime; for $ n = 4$, $ k_0 = 5$ but here $ 1711$ is not prime; for $ n = 5$, $ k_0 = 2$ and the original proof works here; for $ n=6$, $ \frac{10^n - 1}{9}$ is divisible by 7 and the second part of my proof applies. So, the corrected answer to the problem is $ n = 1$ and $ n = 2$.