Khan Academy
Khan Academy: Randomized Algorithms: Fermat's Little Theorem
Introduction to a key result in elementary number theory using a visualization with beads.
Khan Academy
Khan Academy: Randomized Algorithms: Fermat Primality Test
This video is part 10 of a series. It shows a quick outline of how & why it works.