When designing a gear set, engineers usually want the teeth of the gear (Ng) and the pinion (Np) in a "hunting" mesh. Such a mesh or combination is defined as one in which the pinion and the gear do not have any common divisor by a prime number. If a mesh is "hunting," then the pinion must make Np x Ng revolutions before the same pinion tooth meshes with the same gear space. It is often easy to determine if a mesh is hunting by first determining if both the pinion and the gear teeth are divisible by 2,3,5,7,etc. (prime numbers). However, in this age of computerization, how does one program the computer to check for hunting teeth? A simple algorithm is shown below.