Have questions about Fermat's little theorem? Learn more here!

  • Context: Graduate 
  • Thread starter Thread starter Dweirdo
  • Start date Start date
  • Tags Tags
    Theorem
Click For Summary
SUMMARY

This discussion focuses on Fermat's Little Theorem and its application in finding pseudo-primes, specifically Carmichael numbers. The user seeks an efficient algorithm to compute large exponentiations, such as 5^200 mod 200, without directly calculating the large number. A solution is provided that utilizes modular exponentiation techniques to simplify the computation, demonstrating that calculating powers modulo a number can be done efficiently using integer arithmetic in logarithmic time.

PREREQUISITES
  • Understanding of Fermat's Little Theorem
  • Knowledge of modular arithmetic
  • Familiarity with Carmichael numbers
  • Basic skills in algorithm design
NEXT STEPS
  • Research modular exponentiation techniques
  • Explore algorithms for identifying Carmichael numbers
  • Learn about efficient computation methods in number theory
  • Study the implications of Fermat's Little Theorem in cryptography
USEFUL FOR

Mathematicians, computer scientists, and software developers interested in number theory, cryptography, and algorithm optimization will benefit from this discussion.

Dweirdo
Messages
174
Reaction score
0
Hi, I have spme questions about Fermat's little theorem-http://en.wikipedia.org/wiki/Fermat%27s_little_theorem.

I need to think about a mathematical algorithm to deal with this theorem- finding pseudo-primes ,aka, Carmichael numbers.
When I'm dealing with huge numbers ,it is very difficult,let's say:
a is 5, n is 200
than getting a number like 5^200 is stupid, and thus I need another method which will prevent the calculation of this number.
anybody can point me to the right direction?

another thing that I noticed is, if we do the test for non prime numbers such as 15
then we get pairs of reminders, I mean:
(7^15)%15 =13
(13^15)%15=7
just something cool(it's not just for these numbers! )

Thanks in advance!

DW
 
Last edited by a moderator:
Physics news on Phys.org
Since 200 = 128 + 64 + 8, all you need is to calculate 5^8 mod 200, 5^64 mod 200, and 5^128 mod 200, and multiply those together ... and it's easy to calculate those because

5^2 mod 200 = ((5 mod 200)*(5 mod 200)) mod 200 = 25

5^4 mod 200 = ((5^2 mod 200)*(5^2 mod 200)) mod 200 = 625 mod 200 = 25

etc.

so you can check each b using simple integer arithmetic in log(n) time.
 
cool,
Thank You hamster! :D
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 7 ·
Replies
7
Views
7K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 68 ·
3
Replies
68
Views
13K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K