0

I have to choose a digit $a$ and form the number with the decimal representation $\overline{100a}$. Then my friend selects a digit $b$. Now, by inserting one or more digits b, we form the numbers $\overline{100ba}, \overline{100bba}, \overline{100bbba},...$.
If none of these numbers has a common factor (except for $1$) with $\overline{100a}$, I win, otherwise my friend wins. Determine all digits $a$, that secure my win.

Note: $\overline{abcd}$ denotes the positive integer that has exactly the digits $a, b, c \ and \ d$ in the decimal representation from left to right.

My solution: $0, 2, 4, 6 \text{ and } 8$ can be ruled out, since the numbers will all be even. $5$ fails too, all numbers will be divisible by $5$. $9$ should secure a win, as $1009$ is a prime number. I have no definite proof for $1, 3 \ and \ 7$, though.

player3236
  • 16,600
  • Is there no limit on the number of $b$ your friend can insert? – player3236 Oct 03 '20 at 10:00
  • 1
    Not sure the rules are clear. For you to win, are you requiring that $\textit {all}$ of the numbers $100b^na$ are prime to $100a$? If so, how are you so sure of the case $a=9$? – lulu Oct 03 '20 at 10:01
  • @player3236 No, there is no limit. – supermaxy4 Oct 03 '20 at 10:08
  • @lulu Now that you mention it... $9$ doesn‘t secure a win, one of the numbers could have $1009$ as a factor. – supermaxy4 Oct 03 '20 at 10:09
  • @supermaxy4 I think you have hit the bulls-eye re what the problem is asking. I think that (assuming that $a=9$) is the solution, you are required to show that no # with some $b$'s inserted will be divisible by $1009.$ It is unclear to me whether this is true. – user2661923 Oct 03 '20 at 10:13
  • 1
    Also, it is unclear to me that just because $1009$ is prime means that $a=9$ is the only candidate answer. That is, I know that $1001$ is not prime, and I am unsure about $1003, 1007.$ At this point, I am unable to eliminate any of $a=1, a=3,$ or $a=7$ from consideration. – user2661923 Oct 03 '20 at 10:16
  • @user2661923 you make it sound like it‘s a dead end. – supermaxy4 Oct 03 '20 at 10:23
  • @supermaxy4 No, I blindly suspect that with one of the numbers, $a ~\in ~{1,3,7,9},$ that if $k$ is any positive integer, you may be able to prove that inserting $k$ $b$-digits results in a number relatively prime to the number with no $b$-digits inserted. As I say, I think this is the whole point of the problem, and it is unclear whether this is do-able. Also, it is unclear to me, whether induction on the # of $b$-digits would be helpful. – user2661923 Oct 03 '20 at 10:24
  • Well, $a=1$ fails since $11,|,1001$ and $11,|,100111$. $a=3$ also fails for $b=1$, as does $a=7$ So $9$ is, really the only candidate. – lulu Oct 03 '20 at 10:33

1 Answers1

5

Your friend is a sneaky one. No matter what you chose, your friend always wins: he just need to choose the same number as you did.

To show this, we require a lemma:

Suppose $p$ is a prime that is not $2$ or $5$. Then there exists some repunit $R_n$ such that $p \mid R_n$.

Here the repunit $R_n$ is the concatenation of $n$ $1$'s, e.g. $R_5 = 11111$. $$$$ We can show this lemma easily with Pigeonhole principle:

Consider the first $p+1$ repunits $R_1, R_2, \dots, R_{p+1}$.

Each of them has a remainder when divided by $p$, which can take on values $0,1, \dots, p-1$.

Hence by Pigeonhole principle, at least $2$ of them have the same remainder.

Suppose $R_i \equiv R_j \pmod p$, where $i > j$. Then $R_i - R_j = R_{i-j} \times 10^j \equiv 0 \pmod p$.

Since $p$ and $10^j$ are coprime, by Euclid's lemma, $p \mid R_{i-j}$. $$$$

Now for each $a \le 9$, there is some prime $p$ dividing the number $\overline{100a}$ that is not $2$ or $5$.

For this prime, we find $p \mid R_k$.

Finally watch in horror as we find out:

$$\overline{100\underbrace{a...a}_{k+1 \ a\text{'s}}} = \overline{100a} \times 10^{k} + aR_k \equiv 0 \pmod p$$

and you lose.

player3236
  • 16,600
  • 1
    Do you speak to your computer or do you (also) have to use the keyboard? In your native time period, was supermaxy4 the inventor of this problem's solution? – user2661923 Oct 03 '20 at 12:08
  • I feel like I'm missing an obvious joke here, but no, I do not time travel, and I am typing on a keyboard. – player3236 Oct 03 '20 at 12:15
  • 2
    Star Trek 4, Scotty and Bones had to build a transparent aluminum receptacle for the whales. Bones objected to giving a manufacturer the secret and Scotty retorted "how do we know that he didn't invent the thing." Also, when Scotty approaches the computer, he speaks to it. When the computer doesn't respond, Bones suggests using the keyboard, and Scotty replies: "A keyboard, how quaint". – user2661923 Oct 03 '20 at 12:18
  • Gotcha. $ { } $ – player3236 Oct 03 '20 at 12:20
  • The lemma on primes dividing repuinits is proved here in many other places, e.g. here frome a more general perspecitive. – Bill Dubuque Oct 03 '20 at 17:32
  • Side remark: For $a=0$, primes $2$ and $5$ are actually the only prime divisors of $\overline{100a}$. Of course, the problem is trivial in that case. – Ingix Oct 03 '20 at 17:57