The Gateway to Computer Science Excellence
0 votes

Which of the following statement(s) is(are) true?

  • If $n$ is odd prime number then $2^{n-1} \text{ mod } n =1$
  • If $2^{n-1} \text{ mod } n =1$ for a number $n$ then $n$ is prime
in Numerical Ability by Veteran (106k points) | 149 views

2 Answers

0 votes

Answer - Both are True

By taking any example we can prove it

by Veteran (119k points)
@srestha,by taking any example,we will get 1 but how to make sure that it is always true.?
See when u get a question like this question

just take as many as value and check.

No one could check infinite times
0 votes
n is odd prime number take n=3 then 2^(3-1)mod 3=2^2mod3=1

take n=7  then 2^(7-1)mod7=2^6mod7=64mod7=1 where 7 is prime.
by Active (4.1k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,833 questions
57,748 answers
108,118 users