Units Digit of a Power: A Constant-Time Algorithm Using a Little Number Theory
emboss.github.com