1.16: Divisibility Tests for 2, 3, 5, 9, 11
- Page ID
- 82298
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)Recall from Definition 4.2 that the decimal representation of the positive integer \(a\) is given by \[\label{eq:1} a=a_{n-1}a_{n-2}\dotsm a_1a_0 \] when \[a=a_{n-1}10^{n-1}+a_{n-2}10^{n-2}+\dotsb+a_110+a_0\nonumber \] and \(0\le a_i\le 9\) for \(i=0,1,\dotsc,n-1\).
Let the decimal representation of \(a\) be given by (1), then
- \(a\bmod 2=a_0\bmod 2\),
- \(a\bmod 5=a_0\bmod 5\),
- \(a\bmod 3=\left(a_{n-1}+\dotsb+a_0\right)\bmod 3\),
- \(a\bmod 9=\left(a_{n-1}+\dotsb+a_0\right)\bmod 9\),
- \(a\bmod 11=\left(a_0-a_1+a_2-a_3+\dotsb\right)\bmod 11\).
- Proof
-
Consider the polynomial \[f(x)=a_{n-1}x^{n-1}+\dotsb+a_1x+a_0.\nonumber \] Note that \(10\equiv 0\pmod 2\). So by Theorem 15.3 (4) \[a_{n-1}10^{n-1}+\dotsb+a_110+a_0\equiv a_{n-1}0^{n-1}+\dotsb+a_10+a_0\pmod 2.\nonumber \] That is, \[a\equiv a_0\pmod 2.\nonumber \] This, together with Theorem 15.1, proves part (a). Since \(10\equiv 0\pmod 5\), the proof of part (b) is similar.
Note that \(10\equiv 1\pmod 3\) so applying Theorem 15.3 (4) again, we have \[a_{n-1}10^{n-1}+\dotsb+a_110+a_0\equiv a_{n-1}1^{n-1}+\dotsb+a_11+a_0\pmod 3.\nonumber \] That is, \[a\equiv a_{n-1}+\dotsb+a_1+a_0\pmod 3.\nonumber \] This using Theorem 15.1 proves part (c). Since \(10\equiv 1\pmod 9\), the proof of part (d) is similar.
Now \(10\equiv-1\pmod{11}\) so \[a_{n-1}10^{n-1}+\dotsb+a_110+a_0\equiv a_{n-1}(-1)^{n-1}+\dotsb+a_1(-1)+a_0\pmod{11}.\nonumber \] That is, \[a\equiv a_0-a_1+a_2-\dotsb\pmod{11}\nonumber \] and by Theorem 15.1 we are done.
Before proving this theorem, let’s give some examples. \[\begin{aligned} 1457\bmod 2 &=7\bmod 2=1 \\ 1457\bmod 5 &=7\bmod 5=2\end{aligned}\] \[\begin{split} 1457\bmod 3=(1+4+5+7)\bmod 3 &=17\bmod 3 \\ &=8\bmod 3=2 \end{split}\] \[\begin{split} 1457\bmod 9 &=(1+4+5+7)\bmod 9 \\ &=17\bmod 9 \\ &=8\bmod 9 \\ &=8 \end{split}\] \[\begin{split} 1457 \bmod 11 &=7-5+4-1\bmod 11 \\ &=5\bmod 11 \\ &=5. \end{split}\]
Remark \(\PageIndex{1}\)
Note that \[m\mid a\Leftrightarrow a\bmod m=0,\nonumber\] so from Theorem \(\PageIndex{1}\) we obtain immediately the following corollary.
Corollary \(\PageIndex{1}\)
Let \(a\) be given by (1), p. . Then
- \(2\mid a\Leftrightarrow a_0=0,2,4,6\) or \(8\)
- \(5\mid a\Leftrightarrow a_0=0\) or \(5\)
- \(3\mid a\Leftrightarrow 3\mid a_0+a_1+\dotsb+a_{n-1}\)
- \(9\mid a\Leftrightarrow 9\mid a_0+a_1+\dotsb+a_{n-1}\)
- \(11\mid a\Leftrightarrow 11\mid a_0-a_1+a_2-a_3+\dotsb\).
Note that in applying (c), (d) and (e) we can use the fact that \[(a+m) \bmod m = a\nonumber \] to “cast out” \(3\)’s (for (c)) and \(9\)’s (for (d)). Here’s an example of “casting out \(9\)’s:” \[\begin{split} 1487\bmod 9 &=(1+4+8+7) \bmod 9 \\ &=(9+4+7)\bmod 9 \\ &=(4+7)\bmod 9 \\ &=(2+9) \bmod 9 \\ &=2\bmod 9=2. \end{split}\] So \(1487\bmod 9=2\).
Note \(\PageIndex{1}\)
Note that if \(0\leq r<m\) then
\[r\bmod m=r.\nonumber\]
Exercise \(\PageIndex{1}\)
Let \(a=18726132117057\). Find \(a \bmod m\) for \(m=2,3,5,9\) and \(11\).
Exercise \(\PageIndex{2}\)
Let \(a=a_n\dotsm a_1a_0\) be the decimal representation of \(a\). Then prove
- \(a\bmod 10=a_0\).
- \(a\bmod 100=a_1a_0\).
- \(a\bmod 1000=a_2a_1a_0\).
Exercise \(\PageIndex{3}\)
Prove that if \(b\) is a positive square, i.e., \(b=a^2\), \(a>0\), then the least significant digit of \(b\) is one of \(0\), \(1\), \(4\), \(5\), \(6\), \(9\).
- Hint
-
\(b\bmod 10\) is the least significant digit of \(b\). Write \(a=a_{n-1}\dotsm a_0\). Then \(a\equiv a_0\pmod{10}\) so \(a^2\equiv a_0^2\pmod{10}\). For each digit \(a_0\in\{0,1,2,\dotsc,9\}\) find \(a_0^2\bmod 10\). Use Theorem 15.4, among other results.
Exercise \(\PageIndex{4}\)
Are any of the following numbers squares? Explain. \[10, \quad 11, \quad 16, \quad 19, \quad 24, \quad 25, \quad 272,\quad 2983,\quad 11007,\quad 1120378\nonumber\]