Why Fermat's little theorem not working here

You could also use the Chinese Remainder Theorem to solve this particular problem.In summary, Fermat's little theorem states that for any integer a that is coprime to a prime number P, a raised to the power of P-1 mod P is equal to 1. In attempting to solve the equation 2 raised to the power of 133 mod 133, the correct answer should be 128 instead of 2. This can be solved using the concept of finding the remainder when a number is divided by two different numbers, where the remainder should be in a specific form. However, this method may not be as efficient as other methods that make use of cycles, such as the Chinese Remainder Theorem.
  • #1
22990atinesh
143
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
  • #2
Because [itex] 133=19 \times 7 [/itex]!
Actually I don't see any step that you are allowed to use the theorem in!
Your calculation aren't clear too!
 
  • #3
Fermat's little theorem holds only if ##P## is prime.

Edit: Scooped by Shyan. :oops:
 
  • #4
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
 
  • #5
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.
 
  • #6
@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
 
  • #7
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.
 

Related to Why Fermat's little theorem not working here

1. Why does Fermat's Little Theorem not work for every number?

Fermat's Little Theorem only works for prime numbers. For composite numbers, the theorem may not hold true as there may be other factors involved that affect the result.

2. Can you give an example where Fermat's Little Theorem does not work?

One example is the number 561. This number is not prime, but it satisfies the condition in Fermat's Little Theorem. However, if we try to apply the theorem, we get the result 200^561 ≡ 200 (mod 561), which is not true. This shows that the theorem does not always hold for composite numbers.

3. Is there a way to modify Fermat's Little Theorem to work for composite numbers?

Yes, there is a modified version of Fermat's Little Theorem known as the Fermat-Euler theorem. This theorem works for both prime and composite numbers and states that a^(φ(n)) ≡ 1 (mod n), where a is any integer and φ(n) is Euler's totient function.

4. What are the limitations of Fermat's Little Theorem?

Fermat's Little Theorem has limitations in its application, as it only applies to numbers that are relatively prime to the base. It also does not work for every composite number, as mentioned earlier.

5. Why is Fermat's Little Theorem important in mathematics?

Fermat's Little Theorem is important because it helps in proving the primality of a number. It is also used in various cryptographic algorithms, such as the RSA algorithm, which is widely used in secure data transmission. Additionally, it has applications in number theory and other branches of mathematics.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
1
Views
940
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Precalculus Mathematics Homework Help
Replies
4
Views
2K
  • Precalculus Mathematics Homework Help
Replies
2
Views
663
  • Precalculus Mathematics Homework Help
Replies
2
Views
2K
  • Precalculus Mathematics Homework Help
Replies
5
Views
2K
Replies
5
Views
2K
  • Precalculus Mathematics Homework Help
Replies
5
Views
1K
  • General Math
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
Back
Top