Proving the Congruence of n^2 Mod 7: A Modular Problem in Number Theory

  • Thread starter bonfire09
  • Start date
In summary: WLOG: Depending on the situation, you may want to show that the cases repeat. For example, showing these 3 computations should be satisfactory (though if this is for an introductory class, it might be prudent to be more rigorous than this):0^2 mod 7 = 01^2 mod 7 = 1 = 6^2 mod 72^2 mod 7 = 4 = 5^2 mod 73^2 mod 7 = 2 = 4^2 mod 7
  • #1
bonfire09
249
0
I have to prove "For every integer n, n^2 is congruent to exactly one 0,2,or 4mod 7? I don't even know where to start? Apparently its a problem that has 6 other problems to it too meaning a-f and my professor assigned us the last one.
 
Physics news on Phys.org
  • #2
bonfire09 said:
I have to prove "For every integer n, n^2 is congruent to exactly one 0,2,or 4mod 7? I don't even know where to start? Apparently its a problem that has 6 other problems to it too meaning a-f and my professor assigned us the last one.

Hint: You don't have to do it for every n; just for n = 0, 1, 2, 3, 4, 5, 6. Why? And if you think about it a little, you really only need to test n = 0, 1, 2, and 3. Why?
 
  • #3
Hi
Any integer is written as 7m+k where k=0,1,2,3,4,5,6. mod((7m+k)^2) = mod(k^2) for modulus 7.
You can get possible cases in seven calculations. As SteveL27 says you can reduce number of calculations half with attention that mod((7m+k)^2)=mod((7m-k)^2)=mod({7(m-1)+(7-k)}^2)=mod((7-k)^2)=mod(k^2)

In similar ways
For modulus 2, Ans {0,1}
For modulus 3, Ans {0,1}
For modulus 4, Ans {0,1}
For modulus 5, Ans {0,1,4}
For modulus 6, Ans {0,1,3,4}
For modulus 7, Ans {0,1,2,4}
For modulus 8, Ans {0,1,2,3,4}
For modulus 10, Ans {0,1,4,5,6,9}

Regards.
 
Last edited:
  • #4
thanks for the explanation! I think I get what you guys say. I'm going to figure it out and see how far I can get.
 
  • #5
Hint: You don't have to do it for every n; just for n = 0, 1, 2, 3, 4, 5, 6. Why? And if you think about it a little, you really only need to test n = 0, 1, 2, and 3. Why?

Oh that's because 4 and 6 are multiples of 2 and 3 and 5 is basically 2(2)+1.
 
  • #6
bonfire09 said:
Oh that's because 4 and 6 are multiples of 2 and 3 and 5 is basically 2(2)+1.

What I had in mind was that 4 = -3 (mod 7) so you don't have to test 4 since you're squaring.

4^2 is already the same as (-3)^2 = 3^2. So you only need to check 3 but not 4. Likewise you don't have to check 5 or 6.
 
  • #7
the whole point of modular arithmetic is that every specific problem can be done in a finite amount of time by anyone no matter how clueless, just by trying all the cases.

your predicament suggests that you lack the basic idea. hopefully it is getting clearer with this example.
 
  • #8
I proved it by using 4 cases where n=0,n=1,n=2, and n=3. And showed that each case was congruent to exactly one thing. As you use 4,5,6... it repeats so I chose not to show those in my proof.
 
  • #9
bonfire09 said:
I proved it by using 4 cases where n=0,n=1,n=2, and n=3. And showed that each case was congruent to exactly one thing. As you use 4,5,6... it repeats so I chose not to show those in my proof.
I don't see the work where you showed or gave an explanation why it repeats for 4,5,6?
 
  • #10
@bonfire09:
Depending on the situation, you may want to show that the cases repeat. For example, showing these 3 computations should be satisfactory (though if this is for an introductory class, it might be prudent to be more rigorous than this):

0^2 mod 7 = 0
1^2 mod 7 = 1 = 6^2 mod 7
2^2 mod 7 = 4 = 5^2 mod 7
3^2 mod 7 = 2 = 4^2 mod 7

Also, in response to your very first post, 1^2 is not in {0,2,4} mod 7 :P

(I think you made a typo)
 
  • #11
Eval said:
@bonfire09:
Depending on the situation, you may want to show that the cases repeat. For example, showing these 3 computations should be satisfactory (though if this is for an introductory class, it might be prudent to be more rigorous than this):

0^2 mod 7 = 0
1^2 mod 7 = 1 = 6^2 mod 7
2^2 mod 7 = 4 = 5^2 mod 7
3^2 mod 7 = 2 = 4^2 mod 7

Also, in response to your very first post, 1^2 is not in {0,2,4} mod 7 :P

(I think you made a typo)
No, Bonfire wrote 0, 1, 4, 2 as "one, 0, 4, 2". In my post, I tried to say that any proof must be complete,i.e. you can't merely ignore the 4,5,6.
 
  • #12
I know, that was what I was saying. I was responding to him, not you, sorry :/

Also, I read that as a different syntax. I thought he was saying "congruent to exactly one 0,2,or 4mod 7" meaning that it was one of the values in the list {0,2,4}

EDIT: This is one of those cases where you could get away with "WLOG" (Without Loss of Generality), depending on the level at which you are writing the proof.
 
  • #13
Eval said:
I know, that was what I was saying. I was responding to him, not you, sorry :/

Also, I read that as a different syntax. I thought he was saying "congruent to exactly one 0,2,or 4mod 7" meaning that it was one of the values in the list {0,2,4}

EDIT: This is one of those cases where you could get away with "WLOG" (Without Loss of Generality), depending on the level at which you are writing the proof.
Yeah, it could be read either way, which is how some professors try to confuse things to make the student think. As for your edit, I disagree.
 
  • #14
Oh yeah here is my proof:
Case:1 let n=0
Since n=0 then n^2=0. Hence 0 is congruent to 0mod 7.
Case 2:let n=1
Since n=1 then n^2=1. Hence 1 is congruent to 1mod7.
Case 3 let n=2
Since n=2 then n^2=4. Hence 4 is congruent to 4mod7.
Case 4 let n=3
Since n=3 then n^2=9. Hence 9 is congruent to 2mod7.
This is the rundown of my proof. There is not much to assume here except that n is an integer. And prove that each integer n^2 is congruent to exactly one of the four cases.
 
Last edited:
  • #15
bonfire09 said:
Oh yeah here is my proof:
Case:1 let n=0
Since n=0 then n^2=0. Hence 0 is congruent to 0mod 7.
Case 2:let n=1
Since n=1 then n^2=1. Hence 1 is congruent to 1mod7.
Case 3 let n=2
Since n=2 then n^2=4. Hence 4 is congruent to 4mod7.
Case 4 let n=3
Since n=3 then n^2=9. Hence 9 is congruent to 2mod7.
This is the rundown of my proof. There is not much to assume here except that n is an integer. And prove that each integer n^2 is congruent to exactly one of the four cases.

What happens if n = 5793459834895479437?
 
  • #16
Dang! Oh i forgot to represent the integer n as an arbitrary value meaning that n=7m, 7m+1,7m+2,etc
Where m is an integer.
 
  • #17
bonfire09 said:
Oh yeah here is my proof:
Case:1 let n=0
Since n=0 then n^2=0. Hence 0 is congruent to 0mod 7.
Case 2:let n=1
Since n=1 then n^2=1. Hence 1 is congruent to 1mod7.
Case 3 let n=2
Since n=2 then n^2=4. Hence 4 is congruent to 4mod7.
Case 4 let n=3
Since n=3 then n^2=9. Hence 9 is congruent to 2mod7.
This is the rundown of my proof. There is not much to assume here except that n is an integer. And prove that each integer n^2 is congruent to exactly one of the four cases.
How does your proof address the question of whether n = 7m + 4 , 7m +5 and 7m +6 give one of the same values for n = 0 to 3?
 
  • #18
bonfire09 said:
Dang! Oh i forgot to represent the integer n as an arbitrary value meaning that n=7m, 7m+1,7m+2,etc
Where m is an integer.
But the 4 cases you gave even if taken mod 7 do not address the case mentioned by SteveL27 since that is the case where n = 7m + 5, which is not one of the four cases you did.

Actually you could had broken it down into one of the following 4 cases:

n = 7m
n = 7m +/- 1
n = 7m +/- 2
n = 7m +/- 3
 
Last edited:

1. What is a modular problem?

A modular problem is a mathematical problem that involves finding a solution within a restricted set of numbers or values. This set is known as a module, and the goal is to find the remainder when the solution is divided by the module.

2. How is a modular problem solved?

A modular problem can be solved using modular arithmetic, which involves performing basic operations such as addition, subtraction, multiplication, and division on the numbers within the module. The key is to find patterns and use them to simplify the problem.

3. Why is proving a modular problem important?

Proving a modular problem is important because it ensures that the solution is correct and can be applied to other similar problems. It also helps to understand the underlying principles and concepts of modular arithmetic.

4. What are some common techniques for proving a modular problem?

Some common techniques for proving a modular problem include using congruence relations, modular exponentiation, and the Chinese Remainder Theorem. These techniques involve manipulating the equations and using properties of modular arithmetic to reach a solution.

5. Can a modular problem have multiple solutions?

Yes, a modular problem can have multiple solutions. This is because modular arithmetic is cyclical, meaning that numbers within the module will repeat in a pattern. Therefore, there can be multiple numbers that satisfy the given equation.

Similar threads

Replies
5
Views
2K
  • Linear and Abstract Algebra
Replies
1
Views
1K
Replies
2
Views
940
  • Linear and Abstract Algebra
Replies
15
Views
4K
Replies
2
Views
994
  • Engineering and Comp Sci Homework Help
Replies
32
Views
3K
  • Calculus and Beyond Homework Help
Replies
3
Views
503
  • Calculus and Beyond Homework Help
Replies
1
Views
455
Replies
5
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
983
Back
Top