retagged by
17,955 views
19 votes
19 votes
The value of $3^{51} \text{ mod } 5$ is _____
retagged by

18 Answers

Best answer
25 votes
25 votes
$3^{51} \text{ mod } \: 5 = (3^3)^{17} \: \text{ mod } \: 5 = (27)^{17} \: \text{ mod } \: 5 = (27 \text{ mod } 5)^{17} \text{ mod } 5 = 2^{17} \text{ mod } 5 = 131072 \: \text{ mod } 5 = 2$
edited by
65 votes
65 votes

By using Fermat's Little Theorem, if $p$ is a prime number, then

$a^{p-1} \equiv 1 \text{ mod } p$.

$a^{p-1} \text {mod}  p=1$

So, $3^{4} \text{ mod } 5 = 1 $.

$3^{48} \text{ mod } 5 = 3^{12 \times 4} \text{ mod } 5 =1 $.

Now $3^{51} \text{ mod } 5 = (3^{48} \text{ mod } 5) \times (3^3 \text{ mod } 5 )= 3^3 \text{ mod } 5 = 27 \text{ mod } 5= 2$

edited by
21 votes
21 votes

Using Remainder theorem:

Euler totient number $\phi (5)=4$

Given $\dfrac{3^{51}}{5}$, now $\dfrac{3^{51\:\text{mod}\: 4}}{5}= \dfrac{3^{3}}{5}$

Given number is reduced to $\dfrac{27}{5}=2\:\text{(remainder)}$

Hence 2 is correct answer

edited by
12 votes
12 votes
$3^{51}\ mod\ 5$

= $3^{(4*12)+3}\ mod\ 5$

= $(3^{(4*12)} * 3 ^ 3)\ mod\ 5$

=$(3^{(4*12)}\ mod\ 5 )* (3 ^ 3\ mod\ 5) $

=$(3^{4}\ mod\ 5 )^{12}* (3 ^ 3\ mod\ 5) $

=$(81\ mod\ 5 )^{12}* (27\ mod\ 5) $

=$1^{12}*2$

=$2$
edited by
Answer:

Related questions

24 votes
24 votes
8 answers
2
Arjun asked Feb 7, 2019
17,134 views
The following C program is executed on a Unix/Linux system :#include<unistd.h int main() { int i; for(i=0; i<10; i++) if(i%2 == 0) fork(); return 0; }The total number of ...
13 votes
13 votes
4 answers
3
Arjun asked Feb 7, 2019
9,565 views
Consider the following C program :#include<stdio.h int jumble(int x, int y){ x = 2*x+y; return x; } int main(){ int x=2, y=5; y=jumble(y,x); x=jumble(y,x); printf("%d \n"...
17 votes
17 votes
3 answers
4