Show that ## 2^{n} ## divides an integer ## N ##.

  • Thread starter Thread starter Math100
  • Start date Start date
  • Tags Tags
    Integer
Click For Summary

Homework Help Overview

The discussion revolves around the divisibility of an integer \( N \) by \( 2^n \), specifically exploring the relationship between \( N \) and its last \( n \) digits. Participants are examining the conditions under which \( 2^n \) divides \( N \) and the implications of this divisibility in terms of the digits of \( N \).

Discussion Character

  • Conceptual clarification, Assumption checking, Mathematical reasoning

Approaches and Questions Raised

  • Some participants question the assumption that \( N \) has \( n \) digits, citing examples where \( 2^n \) divides \( N \) but \( N \) has fewer digits. Others suggest defining variables clearly to avoid confusion in the proof. There are discussions about the implications of the last \( n \) digits of \( N \) and how they relate to the overall number.

Discussion Status

The discussion is ongoing, with participants providing insights and raising questions about the proof's structure and assumptions. Some have offered guidance on how to approach the proof by considering specific cases for \( n \) and discussing the need to prove both directions of the equivalence. There is recognition of potential counting errors and a need for clarity in variable definitions.

Contextual Notes

Participants are operating under the assumption that \( N \) can have more than \( n \) digits, and there is a focus on the modular arithmetic involved in proving the divisibility conditions. The discussion highlights the need for careful consideration of the definitions and implications of the digits of \( N \).

Math100
Messages
823
Reaction score
234
Homework Statement
Show that ## 2^{n} ## divides an integer ## N ## if and only if ## 2^{n} ## divides the number made up of the last ## n ## digits of ## N ##.
[Hint: ## 10^{k}=2^{k} 5^{k}\equiv 0\pmod {2^{n}} ## for ## k\geq n ##.]
Relevant Equations
None.
Proof:

Suppose ## 2^{n} ## divides an integer ## N ##.
Let ## N=a_{m}10^{m}+a_{m-1}10^{m-1}+\dotsb +a_{1}10+a_{0} ## for ## 0\leq a_{k}\leq 9 ##.
Then ## 2^{n}\mid N\implies 2^{n}\mid (a_{m}10^{m}+a_{m-1}10^{m-1}+\dotsb +a_{1}10+a_{0}) ##.
Note that ## 10^{k}=2^{k} 5^{k}\equiv 0\pmod {2^{n}} ## for ## k\geq n ##.
This means ## 2^{n}\mid 10^{n}\implies 2^{n}\mid (2^{n} 5^{n}) ##.
Thus
\begin{align*}
&2^{n}\mid [10^{n}(a_{n+i}10^{i}+\dotsb +a_{n}]\\
&2^{n}\mid (a_{n+i}10^{n+i}+\dotsb +a_{n}10^{n})\\
&2^{n}\mid (a_{n-1}10^{n-1}+\dotsb +a_{0}).\\
\end{align*}
Conversely, suppose ## 2^{n} ## divides the number made up of the last ## n ## digits of ## N ##.
Then ## 2^{n}\mid (a_{n-1}10^{n-1}+\dotsb +a_{0}) ##.
This means ## a_{n+i}10^{n+i}+\dotsb +a_{n}10^{n}=10^{n}(a_{n+j}10^{j}+\dotsb +a_{n})=2^{n} 5^{n}(a_{n+j}10^{j}+\dotsb +a_{n}) ##.
Thus
\begin{align*}
&2^{n}\mid (a_{n+i}10^{n+i}+\dotsb +a_{n}10^{n})\\
&2^{n}\mid (a_{n+i}10^{n+i}+\dotsb +a_{n-1}10^{n-1}+\dotsb +a_{n}10^{n})\\
&2^{n}\mid N.\\
\end{align*}
Therefore, ## 2^{n} ## divides an integer ## N ## if and only if ## 2^{n} ## divides the number made up of the last ## n ## digits of ## N ##.
 
Physics news on Phys.org
How do we know that ##N## has ##n## digits? ##2^3\,|\,16## but ##16## has only ##2## digits. How can your criteria be an equivalence?

Let us assume ##N## has ##m## digits and ##n\leq m.##

Math100 said:
Thus
\begin{align*}
&2^{n}\mid [10^{n}(a_{n+i}10^{i}+\dotsb +a_{n}]\\
&2^{n}\mid (a_{n+i}10^{n+i}+\dotsb +a_{n}10^{n})\\
&2^{n}\mid (a_{n-1}10^{n-1}+\dotsb +a_{0}).\\
\end{align*}
Here, I got lost. What is i? You have to define the variables that you use. You also made a counting error.

We have ##m\geq n## and also ##2^m\geq 2^n.## Now ##N= (a_{m}10^{m}+a_{m-1}10^{m-1}+\dotsb +a_{n+1}10^{n+1}+a_n 10^n)+(a_{n-1}10^{n-1}+a_{n-2}10^{n-2}+\dotsb +a_{1}10+a_{0}).## From ##2^{m}\geq 2^n## we get ##2^n\,|\,10^n,10^{n+1},10^{n+2},\ldots,10^m## so ##N\equiv (a_{n}10^{n}+a_{n-1}10^{n-1}+\dotsb +a_{1}10+a_{0}) \pmod{2^n}.##

This is already what we have to show.

Remark:
If ##2^n\,|\,N## then ##0\equiv N\equiv (a_{n}10^{n}+a_{n-1}10^{n-1}+\dotsb +a_{1}10+a_{0}) \pmod{2^n}.##

If ##2^n\,|\, (a_{n}10^{n}+a_{n-1}10^{n-1}+\dotsb +a_{1}10+a_{0}) \pmod{2^n}## then ##N\equiv (a_{n}10^{n}+a_{n-1}10^{n-1}+\dotsb +a_{1}10+a_{0}) \equiv 0 \pmod{2^n}.##

The zero is on the left in one direction and on the right in the other direction.
Math100 said:
Conversely, suppose ## 2^{n} ## divides the number made up of the last ## n ## digits of ## N ##.
Then ## 2^{n}\mid (a_{n-1}10^{n-1}+\dotsb +a_{0}) ##.
This means ## a_{n+i}10^{n+i}+\dotsb +a_{n}10^{n}=10^{n}(a_{n+j}10^{j}+\dotsb +a_{n})=2^{n} 5^{n}(a_{n+j}10^{j}+\dotsb +a_{n}) ##.
Thus
\begin{align*}
&2^{n}\mid (a_{n+i}10^{n+i}+\dotsb +a_{n}10^{n})\\
&2^{n}\mid (a_{n+i}10^{n+i}+\dotsb +a_{n-1}10^{n-1}+\dotsb +a_{n}10^{n})\\
&2^{n}\mid N.\\
\end{align*}
Therefore, ## 2^{n} ## divides an integer ## N ## if and only if ## 2^{n} ## divides the number made up of the last ## n ## digits of ## N ##.
 
  • Like
Likes   Reactions: Math100
fresh_42 said:
How do we know that ##N## has ##n## digits? ##2^3\,|\,16## but ##16## has only ##2## digits. How can your criteria be an equivalence?

Let us assume ##N## has ##m## digits and ##n\leq m.##Here, I got lost. What is i? You have to define the variables that you use. You also made a counting error.

We have ##m\geq n## and also ##2^m\geq 2^n.## Now ##N= (a_{m}10^{m}+a_{m-1}10^{m-1}+\dotsb +a_{n+1}10^{n+1}+a_n 10^n)+(a_{n-1}10^{n-1}+a_{n-2}10^{n-2}+\dotsb +a_{1}10+a_{0}).## From ##2^{m}\geq 2^n## we get ##2^n\,|\,10^n,10^{n+1},10^{n+2},\ldots,10^m## so ##N\equiv (a_{n}10^{n}+a_{n-1}10^{n-1}+\dotsb +a_{1}10+a_{0}) \pmod{2^n}.##

This is already what we have to show.

Remark:
If ##2^n\,|\,N## then ##0\equiv N\equiv (a_{n}10^{n}+a_{n-1}10^{n-1}+\dotsb +a_{1}10+a_{0}) \pmod{2^n}.##

If ##2^n\,|\, (a_{n}10^{n}+a_{n-1}10^{n-1}+\dotsb +a_{1}10+a_{0}) \pmod{2^n}## then ##N\equiv (a_{n}10^{n}+a_{n-1}10^{n-1}+\dotsb +a_{1}10+a_{0}) \equiv 0 \pmod{2^n}.##

The zero is on the left in one direction and on the right in the other direction.
I forgot to quantify the variable ## i ##.
 
Math100 said:
I forgot to quantify the variable ## i ##.
I assume ##m=n+i## and ##j=i.## It was already late over here and I'm a bit tired. Guess I have been a bit harsher than necessary, sorry. Your proof looks ok except for the counting error. The last ##n## digits are ##a_{n-1},a_{n-2},\ldots,a_1,a_0.##
 
  • Like
Likes   Reactions: Math100
@Math100, here are some ideas to think about.
If n = 1, ##2^n = 2^1 = 2## has to divide only the last digit, call it ##d_0##. That's trivial, since if 2 divides the last digit, the number N is even.
If n = 2, ##2^n = 2^2 = 4## has to divide the last two digits, ##d_1d_0##. This means that ##d^2##, if there is such a digit in N, is in the hundreds' place. 4 divides ##d_2 \times 100##, so if 4 also divides ##d_1d_0##, 4 also divides N.
And so on, which I leave to you. Each larger value of n corresponds to a higher power of 10, which has another factor of 2. A proof by induction might be appropriate here.

Keep in mind that this is an "if and only if" type of proof, so you have to also prove the converse. I.e., you need to prove that if ##2^n## divides the last n digits of N, then ##2^n## divides N, and if ##2^n## divides N, then ##2^n## divides the last n digits of N.
 
fresh_42 said:
How do we know that ##N## has ##n## digits? ##2^3\,|\,16## but ##16## has only ##2## digits. How can your criteria be an equivalence?

Let us assume ##N## has ##m## digits and ##n\leq m.##Here, I got lost. What is i? You have to define the variables that you use. You also made a counting error.

We have ##m\geq n## and also ##2^m\geq 2^n.## Now ##N= (a_{m}10^{m}+a_{m-1}10^{m-1}+\dotsb +a_{n+1}10^{n+1}+a_n 10^n)+(a_{n-1}10^{n-1}+a_{n-2}10^{n-2}+\dotsb +a_{1}10+a_{0}).## From ##2^{m}\geq 2^n## we get ##2^n\,|\,10^n,10^{n+1},10^{n+2},\ldots,10^m## so ##N\equiv (a_{n}10^{n}+a_{n-1}10^{n-1}+\dotsb +a_{1}10+a_{0}) \pmod{2^n}.##

This is already what we have to show.

Remark:
If ##2^n\,|\,N## then ##0\equiv N\equiv (a_{n}10^{n}+a_{n-1}10^{n-1}+\dotsb +a_{1}10+a_{0}) \pmod{2^n}.##

If ##2^n\,|\, (a_{n}10^{n}+a_{n-1}10^{n-1}+\dotsb +a_{1}10+a_{0}) \pmod{2^n}## then ##N\equiv (a_{n}10^{n}+a_{n-1}10^{n-1}+\dotsb +a_{1}10+a_{0}) \equiv 0 \pmod{2^n}.##

The zero is on the left in one direction and on the right in the other direction.
But for the second part of the proof which starts with 'Conversely...', how should I prove this? Starting out with ## 2^{n}\mid (a_{n}10^{n}+a_{n-1}10^{n-1}+\dotsb +a_{1}10+a_{0})\pmod {2^{n}} ##. At first, I thought that using the hint would be easier but you said that there are counting errors.
 
Last edited:
Math100 said:
But for the second part of the proof which starts with 'Conversely...', how should I prove this? Starting out with ## 2^{n}\mid (a_{n}10^{n}+a_{n-1}10^{n-1}+\dotsb +a_{1}10+a_{0})\pmod {2^{n}} ##. At first, I thought that using the hint would be easier but you said that there are counting errors.
Your error is that you wrote ##a_n## but it should be ##a_{n-1}##.
$$|\{a_0,a_1,a_2,\ldots,a_{n-2},a_{n-1},a_n\}|=n+1\quad \; , \;\quad |\{a_0,a_1,a_2,\ldots,a_{n-2},a_{n-1}\}|=n$$
##n## digits means to stop at ##n-1## since we started counting at ##0.##
 
  • Like
Likes   Reactions: Math100

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
3
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
14
Views
2K