AlgoScope

Fermat's Little Theorem

For prime p and a not divisible by p, a^(p-1) = 1 mod p.

Mathematics, mathematics, intermediate
3 to the 6 mod 7 is 1.302162435415i
3 to the 6 mod 7 is 1.302162435415i

Multiples, Powers, Pascal: 3 to the 6 mod 7

Decision, step 7 of 8

3^6 = 5 x 3 mod 7 = 15 mod 7 = 1. Exponent 6 lands on 1, as Fermat promised.

How multiples, powers, pascal works

Cost

Space
O(1)

Leads to

Topics that need this one first.

Taught by the same lesson

Multiples, Powers, Pascal covers these too, in the same run.