Algorithmic number theory - Bach, Eric; Shallit, Jeffrey O. (Foundations of computing series)