1
$\begingroup$

For example, for $n=2$, $m$ is $12$.

For $n=3$, $m=112$.

How to prove it for any integer $n$?

  • 1
    More on hold garbage. I thought that this was an interesting question. As such, it needs no context.2017-01-23

2 Answers 2

2

Your examples show that it is true for $n=2, 3$.

Suppose it is true for $n$, and $2^n | A_n = a_{n-1}a_{n-2}…a_0 $.

Consider $A_{n+1} = a_na_{n-1}a_{n-2}…a_0 = 10^n a_n +A_n $.

Let $B_n = \dfrac{A_n}{2^n} $.

Then $A_{n+1} =10^na_n+2^nB_n =2^n(5^na_n+B_n) $.

To make $2^{n+1} | A_{n+1}$, it will be enough if $5^na_n+B_n$ is even.

To do this, choose $a_n$ to have the same parity as $B_n$ (i.e., even if $B_n$ is, odd if not). In particular, we can choose $a_n = 2+(B_n \bmod 2)$ so that, starting with the examples for $n=2, 3$, we can generate as many $a_n$ as wanted.

1

Construct the numbers by induction:

Let $a_n$ the $n$-digit number with digits $1$ or $2$ divisible by $2^n$.

If $\frac{a_n}{2^{n+1}}$ is an integer, then $a_{n+1}=2\cdot 10^n+a_n$ (prepend a $2$)

Otherwise, $a_{n+1}=10^n+a_n$ (prepend a $1$)

It is easy to show that $a_{n+1}$ is divisible by $2^{n+1}$

It can be even shown that $a_n$ is the unique $n$ digit number of $1$'s and $2$'s that is divisible by $2^n$ (take two such numbers which obviously should be congruent modulo $2^n$, and prove the digits are identical also by induction, but starting with the last digit).

  • 0
    You were one minute later than me, but have the same idea so I upvoted you.2017-01-23
  • 0
    Yeah, frustrating to work it out and write it down and post it just to see that somebody else already has done the same thing 15 seconds before you.2017-01-23
  • 0
    I never write it down. I work out the math as I enter it. If complicated, I use macdown offline so I can copy and paste2017-01-23