lap - compute least annihilating power of a number
lap <a> <m>
The lap program computes the order of a modulo m, for arbitrary precision integers a and m. The order of a modulo m is defined as the smallest positive value n for which a raised to the nth power, modulo m, is equal to 1. The order may not exist, if m is composite.
This program is very slow, especially for large moduli. It is intended as a way to help find primitive elements in a modular field, but it does not do so in a particularly inefficient manner. It was written simply to help verify that a particular candidate does not have an obviously short cycle mod m.
Michael J. Fromberger <firstname.lastname@example.org> Thayer School of Engineering, Hanover, New Hampshire, USA $Date: 2000/07/14 00:44:34 $