3.3: Divisibility rules revisited
( \newcommand{\kernel}{\mathrm{null}\,}\)
Thinking out Loud
Can any integer n be written as a sum of distinct powers of 2?
Example 3.3.1:
Express 2019 as a sum of distinct powers of 2?
Note that, 10≡1(mod3),10≡1(mod9), and 10≡(−1)(mod11),.
Let x∈Z+.
Then x=dn10n+dn−110n−1+⋯+d2102+d1101+d0,
which implies
x=10(dn10n−1+dn−110n−2+⋯+d210+d1)+d0.
Thus we can express x as 10a+b, where b=d0 is the ones digit of x, and a=dn10n−1+dn−110n−2+⋯+d210+d1.
Divisibility by 2=21:
Let x=dn10n+dn−110n−1+⋯+d2102+d1101+d0∈Z+, then 2∣x iff 2∣d0. In other words, 2 divides an integer iff the ones digit of the integer is either 0,2,4,6, or 8. That is. x≡0(mod2) iff d0≡0(mod2).
Proof:
Since 10≡0(mod2) and x=10a+b, x≡0(mod2) iff d0≡0(mod2).◻
Divisibility by 5:
Let x=dn10n+dn−110n−1+⋯+d2102+d1101+d0∈Z+, then 5∣x iff 5∣d0. In other words, 5 divides an integer iff the ones digit of the integer is either 0, or 5.
That is. x≡0(mod5) iff d0≡0(mod5).
Proof:
Since 10≡0(mod5) and x=10a+b, x≡0(mod5) iff d0≡0(mod5).◻
Divisibility by 10:
Let x=dn10n+dn−110n−1+⋯+d2102+d1101+d0∈Z+, then 10∣x iff 10∣d0. In other words, 10 divides an integer iff the ones digit of the integer is 0,.
That is. x≡0(mod10) iff d0≡0(mod10).
Proof:
Since 10≡0(mod10) and x=10a+b, x≡0(mod10) iff d0≡0(mod10).◻
Divisibility by 4=22:
Let x=dn10n+dn−110n−1+⋯+d2102+d1101+d0∈Z+, then 4∣x iff 4∣d1d0. That is. x≡0(mod4) iff d1d0≡0(mod4).
Proof:
Let x be an integer. Then
x=dn10n+dn−110n−1+⋯+d2102+d1101+d0, which implies
x=100(dn10n−2+dn−110n−3+⋯+d2)+10d1+d0=100(dn10n−2+dn−110n−3+⋯+d2)+d1d0.
Since 100≡0(mod4), x=100a+d1d0, x≡0(mod4) iff d1d0≡0(mod4).◻
Divisibility by 8=23:
Let x=dn10n+dn−110n−1+⋯+d2102+d1101+d0∈Z+, then 8∣x iff 8∣d2d1d0. That is. x≡0(mod8) iff d2d1d0≡0(mod8).
Proof:
Let x be an integer. Then
x=dn10n+dn−110n−1+⋯+d2102+d1101+d0, which implies
x=103(dn10n−3+dn−110n−4+⋯+d3)+100d2+10d1+d0=103(dn10n−3+dn−110n−4+⋯+d3)+d2d1d0.
Since 1000≡0(mod8), x=1000a+d2d1d0, x≡0(mod8) iff d2d1d0≡0(mod8).◻
A similar argument can be made for divisibility by 2n, for any positive integer n. The following results follows from the fact that,
x=dn10n+dn−110n−1+⋯+d2102+d1101+d0=dn(10n−1)+dn−1(10n−1−1)+⋯+d2(102−1)+d1(101−1)+(dn+dn−1+⋯+d1+d0).
Divisibility by 3:
Let x=dn10n+dn−110n−1+⋯+d2102+d1101+d0∈Z+, then 3∣x iff 3 divides sum of its digits.
- Proof:
-
Let x be an integer. Then
x=dn10n+dn−110n−1+⋯+d2102+d1101+d0, which implies x=dn(10n−1)+dn−1(10n−1−1)+⋯+d2(102−1)+d1(101−1)+(dn+dn−1+⋯+d1+d0).
Hence, x(mod3)≡dn(10n−1)+dn−1(10n−1−1)+⋯+d2(102−1)+d1(101−1))(mod3)+(dn+dn−1+⋯+d1+d0)(mod3). Notice that (10n−1)≡0(mod3), for all positive integer n.
Therefore, x(mod3)≡(dn+dn−1+⋯+d1+d0)(mod3).
Thus, 3∣x iff 3 divides sum of its digits.
Divisibility by 9=32:
Let x=dn10n+dn−110n−1+⋯+d2102+d1101+d0∈Z+, then 9∣x iff 9 divides sum of its digits.
- Proof:
-
Let x be an integer. Then
x=dn10n+dn−110n−1+⋯+d2102+d1101+d0, which implies x=dn(10n−1)+dn−1(10n−1−1)+⋯+d2(102−1)+d1(101−1)+(dn+dn−1+⋯+d1+d0).
Hence, x(mod9)≡dn(10n−1)+dn−1(10n−1−1)+⋯+d2(102−1)+d1(101−1))(mod9)+(dn+dn−1+⋯+d1+d0)(mod9). Notice that (10n−1)≡0(mod9), for all positive integer n.
Therefore, x(mod9)≡(dn+dn−1+⋯+d1+d0)(mod9).
Thus, 9∣x iff 9 divides sum of its digits.
Divisibility by 7:
7∣x iff 7 divides the absolute difference between a−2b, where x=10a+b, and, b=d0 is the ones digit of x and a=dn10n−1+dn−110n−2+⋯+d210+d1.
Proof:
Divisibility by 11:
11∣x iff 11 divides the absolute difference between alternate sum.
Proof: