Show that for any positive integer n, there exists a positive integer m such that n divides m (namely, m = kn for some integer k), and the decimal digits of m are only 0 and 1. For example, n = 7, m = 1001. In addition to show that this is true in general, use n = 7 and n = 12 to show how to find such m.
令 \(a_k=\underbrace{11\cdots1}_{k\text{ 個 }1}\),取 \(a_1,a_2,\dots,a_{n+1}\) 共 \(n+1\) 個數
除以 \(n\) 的餘數只有 \(0,1,\dots,n-1\) 共 \(n\) 種 → 鴿籠原理:有 \(i\lt j\) 使 \(a_i\equiv a_j\pmod n\)
\(a_j-a_i=\underbrace{11\cdots1}_{j-i}\underbrace{00\cdots0}_{i}\) 被 \(n\) 整除,且只含數字 0、1,取 \(m=a_j-a_i\) (若某個 \(a_k\equiv0\),直接取 \(m=a_k\))
得證
\(n=7\):\(a_k\bmod7\):\(a_1=1,\ a_2=11\to4,\ a_3=111\to6,\ a_4=1111\to5,\ a_5=11111\to2,\ a_6=111111\to0\)
\(m=111111=7\times15873\)
\(1001=7\times143\) 也可。\(a_7\equiv1\equiv a_1\),\(a_7-a_1=1111110=7\times158730\)。
\(n=12\):\(a_k\bmod12\):\(1,\ 11,\ 3,\ 7,\ 11,\dots\);\(a_2\equiv a_5\equiv11\)
\(a_5-a_2=11111-11=11100\)
\(m=11100=12\times925\)