Monday, 16 September 2013

elementary number theory - Find the remainder using Fermat's little theorem when 5119 is divided by 59?





How to find the remainder using Fermat's little theorem?




Fermat's little theorem states that if p is prime and gcd(a,p)=1,then ap11 is a multiple of p.



For example, p=5,a=3. From the theorem, 3511 is a multiple of 5 i.e 80 is a multiple of 5.



Similarly, I need to find the remainder when 5119 is divided by 59.




My approach:



Using theorem I solve:



511911=511815118=59k+1, where k is a natural number.



How do I proceed?


Answer



According to Fermat's theorem a^{p-1}\equiv 1 \pmod p.

Here p=59 hence a^{58} \equiv 1 \pmod {59}.



Now a^{119}=a^{2\times58+3}=a^{58\times2}a^3\equiv 1\times a^3 \pmod {59}



In your case a=5, therefore 5^{119}\equiv 5^3\equiv 7 \pmod {59}



So the answer is 7.


No comments:

Post a Comment

real analysis - How to find lim_{hrightarrow 0}frac{sin(ha)}{h}

How to find \lim_{h\rightarrow 0}\frac{\sin(ha)}{h} without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...