Let $a$ be an odd digit and $b$ an even digit. Prove that for every positive integer $n$ there exists a positive integer, divisible by $2^n$, whose decimal representation contains no digits other than $a$ and $b$.
Problem
Source: Baltic Way 1998
Tags: modular arithmetic, induction, number theory proposed, number theory
12.01.2011 13:57
WakeUp wrote: Let $a$ be an odd digit and $b$ an even digit. Prove that for every positive integer $n$ there exists a positive integer, divisible by $2^n$, whose decimal representation contains no digits other than $a$ and $b$. In fact, there is a more general property : $\forall n>0$, and forall $m\in[0,2^n)$, there exists a positive integer $x$ whose decimal representation contains $a,b$ such that $x\equiv m\pmod {2^n}$ And this is easy to show with induction. Let $a=2p+1$ the odd digit. Let $b=2q$ the even digit. The property is obviously true for $n=1$ since $a\equiv 1\pmod 2$ and $b\equiv 0\pmod 2$ Suppose it's true for $n$ Let $m\in[0,2^{n+1})$ If $m$ is even, we get $m=2u$ with ${u\in[0,2^n})$ Using induction hypothesis, let $x$ (containing only $a,b$ digits) such that $x\equiv \frac{u-q}5\pmod{2^n}$ So $5x+q\equiv u\pmod{2^n}$ So $10x+b\equiv m\pmod{2^{n+1}}$ So $10x+b$ is the answer If $m$ is odd, we get $m=2u+1$ with ${u\in[0,2^n})$ Using induction hypothesis, let $x$ (containing only $a,b$ digits) such that $x\equiv \frac{u-p}5\pmod{2^n}$ So $5x+p\equiv u\pmod{2^n}$ So $10x+a\equiv m\pmod{2^{n+1}}$ So $10x+a$ is the answer And since the general property is true, choosing $m=0$ gives the required less general property. Q.E.D.
12.01.2011 14:10
WakeUp wrote: Let $a$ be an odd digit and $b$ an even digit. Prove that for every positive integer $n$ there exists a positive integer, divisible by $2^n$, whose decimal representation contains no digits other than $a$ and $b$. Another solution (same idea) : Let $A_n$ be the set of all positive integers containing exactly $n$ digits without digit different from $a,b$ It's very easy to show that $x\equiv y\pmod{2^n}$ with $x,y\in A_n$ implies $x=y$ (induction on the size, looking at the rightmost digit) And since $|A_n|=2^n$, all these numbers cover all the values from $0$ to $2^{n}-1$ modulus $2^n$ Hence the result.
03.01.2019 03:31
Another one. We prove by inducting on $n$ that such a number exists (and consists of $n$ digits). For $n=2$, check that either $\overline{ab}$ or $\overline{bb}$ (depending on whether $4\mid b$ or not) satisfies the claim. Suppose that, there exists an $x^{(n)}=\overline{x_1\dots x_n}$ such that, $2^n\mid x^{(n)}$. Let $x^{(n)}=2^n\cdot k$. If $k$ is odd, consider the number, $\overline{ax_1\dots x_n}=2^n (k+a \cdot 5^n)$, which is clearly divisible by $2^{n+1}$, as $k+a\cdot 5^n$ is odd. If $k$ is even, repeat the argument, by taking $x^{(n+1)}=\overline{bx_1\dots x_n}$, which. modifies $x^{(n+1)}$ to $2^n(k+b\cdot 5^n)$, which clearly is divisible by $2^{n+1}$. Note: The construction I've used above is very similar to a one, used for this USAMO 2003 problem.