--- from: http://rosettacode.org/wiki/Chernick's_Carmichael_numbers note: Mathematics