For a certain positive integer n, n^2 gives a remainder of 4 when divided by 5, and n^3 gives a remainder of 2 when divided by 5. What remainder does n give when divided by 5?
$$n^2\equiv4\mod 5\\n^3\equiv2\mod 5$$
since \(n^3=n^2n\) consider what you'd multiply \(4\) by to get a number that is \(2\) greater than a multiple of \(5\)
The statement "\(n^2\) gives a remainder of 4 when divided by \(5\)" means: \[n^2\equiv 4\pmod{5}.\]Similarly, the second statement gives:\[n^3\equiv 2\pmod{5}.\]How can you use these two statements to solve:\[n\equiv \mbox{?}\pmod{5}.\] Hint: \(n^3=n^2\cdot n.\)
let's examine our multiples:$$4,8,12,\dots$$hmm, \(12=5(2)+2\equiv2\mod 5\). noting \(12=3\times4\) this suggests that \(n=3\), and checking \(n^2=9\equiv4\mod5\) this verifies our answer
a more 'straightforward' solution involves finding the multiplicative inverse of \(n^2\mod 5\)... from \(n^2\equiv4\equiv-1\mod 5\) we have that \(n^4\equiv1\mod 5\) hence \(n^2\) is its own multiplicative inverse, so:$$n\equiv n^3n^{-2}\equiv n^3n^2\equiv2\times4\equiv3\mod 5$$
Oooh!! I understand now! You just insist on answering all my question don't you XD
n^3 - n^2 = n^2(n-1) = 2 mod 5, n^2 = 4 mod 5 so n-1 = 3 mod 5 and n = 4 mod 5 yeah or no?
oops, got the numbers backwards...sorry
well @orple8 the logical idea is that normally we could divide the two to get \(n\)... in \(\mod5\) we have the similar concept of a multiplicative inverse
@pgpilot326 heehee :)
@pgpilot326 right that should be \(n^3-n^2\equiv-2\equiv3\mod 5\) hence \(n-1\equiv(n^3-n^2)n^{-2}\equiv3\times 4\equiv12\equiv2\mod 5\) hence \(n\equiv2+1=3\mod 5\)
Or you could have use Fermat's LittleTheorem:\[n\equiv n^5\equiv n^2\cdot n^3\equiv 2\cdot 4=8\equiv 3\pmod{5}\]
n^3 - n^ = -2 = 3 mod 5 => n^2(n-1) = 3 mod 5 8 = 3 mod 5, n^2 = 4 mod 5 => n-1 = 2 mod 5 so n = 3 mod 5
Thanks everyone :)
i like fermat's little thm
Join our real-time social learning platform and learn together with your friends!