Why Fermat's little theorem not working here

  • Thread starter Thread starter 22990atinesh
  • Start date Start date
  • Tags Tags
    Modulus Theorem
Click For Summary

Homework Help Overview

The discussion revolves around the application of Fermat's Little Theorem in the context of modular arithmetic, specifically evaluating the expression \(2^{133} \mod 133\). Participants are exploring why the theorem appears not to yield the expected result in this case.

Discussion Character

  • Exploratory, Assumption checking, Mathematical reasoning

Approaches and Questions Raised

  • Participants discuss the conditions under which Fermat's Little Theorem is applicable, particularly questioning its use when the modulus is not prime. There are attempts to clarify the steps involved in the calculations and the reasoning behind them.

Discussion Status

The discussion is ongoing, with participants providing insights and raising questions about the validity of the theorem's application in this scenario. Some participants suggest alternative approaches and clarify the implications of the theorem's conditions.

Contextual Notes

Participants note that \(133\) is a composite number, specifically \(19 \times 7\), which raises questions about the use of Fermat's Little Theorem. There is also mention of a method involving modular relationships that some participants find unclear.

22990atinesh
Messages
143
Reaction score
1

Homework Statement


Fermats little theorem states that

##a^{P-1} \mod P = 1 \mid ## a is coprime to P
Now I'm trying to solve this equation with the help of above theorem, But I'm ending up with wrong result

##2^{133} \mod 133##

Homework Equations


##a^{P-1} \mod P = 1##
##(A \times B) \mod n = [(A \mod n) \times (B \mod n)] \mod n##

The Attempt at a Solution


##2^{133} \mod 133##
##= 2^{132+1} \mod 133##
##= 2^{132} \times 2 \mod 133##
##= [2^{132} \mod 133] \times [2 \mod 133]##
##\because (A \times B) \mod n = [(A \mod n) \times (B \mod n)] \mod n##
##= 1 \times 2 = 2##

But the correct ans is ##2^{133} \mod 133 = 128##
 
Physics news on Phys.org
Because 133=19 \times 7!
Actually I don't see any step that you are allowed to use the theorem in!
Your calculation aren't clear too!
 
Fermat's little theorem holds only if ##P## is prime.

Edit: Scooped by Shyan. :oops:
 
Sorry little mistake

##2^{133} \mod 133##
##= 2^{18 \times 7 + 7} \mod {19 \times 7}##
##= 2^{18 \times 7} \times 2^7 \mod {19 \times 7}##

Now how can we solve it
 
2133=(27)19=12819. p = 19, prime, and 128 is not divisible with 19. Apply Fermat's Little Theorem to a=128 and p=19.
 
@ehlid @Shayn
Actually I was watching an Online lecture, In it the teacher uses the following concept to solve the above problem

Suppose ##K \mod (A \times B) = R##

##K \mod A = r_1 \implies K = A \times x + r_1##
##K \mod B = r_2 \implies K = B \times y + r_2##

Then "R should be in ##A \times x + r_1## and ##B \times y + r_2## form". This statement I didn't understand
 
If ##K = Ax+r_1## and ##K =By+r_2##, Then look at A mod y=C and B mod x=D.
Then ## K=myx+Cx+r_1=nxy+Dy+r_2 ##
Thus ##K \mod xy = Cx+r_1=Dy+r_2##.
An example might be:
32 = 2 mod 3 and 32 = 0 mod 2.
Let 2=x, 3=y, r_1 =0, r_2 = 2, A= 16, B =10.
A mod y = 16 mod 3 = 1 =C.
B mod x = 10 mod 2 = 0 = D.
So 32 mod (2*3) = Cx+r_1=1*2+0=2 and =Dy+r_2=0*3+2=2.
This method could get ugly fast and is not as efficient as other methods that make use of cycles.
 

Similar threads

Replies
1
Views
1K
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
23K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 9 ·
Replies
9
Views
3K
Replies
27
Views
5K