Primality testing with Fermat's little theorem

If n is a prime, and 0 < b < n, then bn-1 is congruent to 1 modulo n. So if we compute bn-1 modulo n, and don't get 1, then we can conclude that n is not a prime.

n =

A number n is a pseudoprime to the base b if bn-1 is congruent to 1 modulo n. If a number is a pseudoprime to a variety of bases, then it is likely to be a prime. Below you can find out which composite numbers less than m are pseudoprimes to various bases.

m = 11  13  17  19 

A Carmichael number is a composite number n such that bn-1 is congruent to 1 modulo n for every b that is relatively prime to n. So a Carmichael number passes the Fermat's-little-theorem test as best as it can.
What are the Carmichael numbers less than m?

m =