Hi, I have spme questions about Fermat's little theorem-http://en.wikipedia.org/wiki/Fermat%27s_little_theorem. [Broken](adsbygoogle = window.adsbygoogle || []).push({});

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

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Fermat's little theorem

Loading...

Similar Threads - Fermat's little theorem | Date |
---|---|

I Fermat's Little Theorem ... Anderson and Feil, Theorem 8.7 . | Feb 26, 2017 |

Expansion of Fermat's Little Theorem | Apr 5, 2010 |

A Proof of Fermat's Little Theorem | Dec 6, 2009 |

Fermats little theorem on permutations | Jan 27, 2009 |

Proof of Fermat's Little Theorem | Sep 8, 2005 |

**Physics Forums - The Fusion of Science and Community**