Number theoryDifficulty 5.3AIME, harderProve itCroatia
Prove that the number whose decimal representation consists of 2187 digits 1 is divisible by 2187.
Solution
Let N be the number whose decimal representation consists of 2187 digits 1. Then N=2187digits111…1=9102187−1.
We want to show that 2187 divides N.
Note that 2187=37.
It suffices to show that 37 divides N.
Since N=9102187−1, we need to show that 37 divides 102187−1.
Observe that 10k≡1(mod9) for any k, but we need divisibility by 37.
Let us use Euler's theorem:
Since gcd(10,37)=1, Euler's theorem gives 10φ(37)≡1(mod37), where φ(37)=37−36=2187−729=1458.
So 101458≡1(mod2187).
But 2187=37, and 2187 divides 102187−1 if and only if the order of 10 modulo 2187 divides 2187.
Alternatively, note that N=9102187−1, so N is an integer, and 37 divides N if and only if 102187≡1(mod38), since N=9102187−1 and 37 divides N if 102187≡1(mod38).
But actually, since N is a repunit, and 3k divides 103k−1 for k≥1, we can use induction or known results:
For any k≥1, 3k divides 103k−1.
Proof by induction:
Base case: k=1, 103−1=999, which is divisible by 3.