towards Fermat's little theorem:   powers aj mod n

n =