Sunday, April 29, 2018

modular arithmetic - Show that if n>0 is an integer, then n2 is congruent to only 0,1,2 or 4 modulo 7



No solution please, I just need some guidance. I've tried various approaches so far yet no prevail.




  • I've looked at small number cases and tried to identify something interesting. Couldn't find much though.

  • I've thought about how n can only be odd or even, hence I took the form n = 2k or n = 2k+1 and squared each respectively. Which was indeed interesting because the odd took the form of 2k2+4k+1 after being squared which seems interesting because n^2 can be congruent to 2,4 and 1 mod 7. But I can't really advance from there, or if this isn't relevant.




I'm hoping to get a sense of direction from you. Thanks.


Answer



You only have to consider 7 numbers:



0,1,2,3,4=73,5=72,6=71



Square each of them and you are done.




Another way to phrase it is each number can be written as 7k+r where r{0,1,2,3,4,5,6}, just study (7k+r)2 to convince yourselves that it suffices to study 7 numbers.


No comments:

Post a Comment

analysis - Injection, making bijection

I have injection f:AB and I want to get bijection. Can I just resting codomain to f(A)? I know that every function i...