I'm not sure how to exactly ask this question. I'm essentially looking for a way to solve a set of natural numbers from a set of equation based on a gear. In addition I'm looking for a way to prove if there such a set exists. And if it does not is there an easy way to find a set of numbers, restricted to X decimal places, that exits to fit the equation system?
My question is based on gears and requires to solve a system of equation. If there is a gear with N number of teeth, a outer/tip diameter $ \mathbf{\phi_{tip}} $, a inner/root diameter $ \mathbf{\phi_{root}} $, and the linear distance d between each tooth along the outer diameter. There are two images below. In the second image the pitch if moved to the tips of the teeth would be the representation of the distance d.
The restriction/problem is to find a solution or set of solution such that $ \mathbf{ N, \phi_{tip}, \phi_{root}, d} \in \Bbb N $, or prove it is impossible for such a set to exist.

The equation to form a system are:
$$ \phi_{ref} = Nm $$ $$ \phi_{tip} = \phi_{ref} + 2m $$ $$ \phi_{root} = \phi_{ref} - 2.5m $$ $$ d = \sqrt{2r^2\left(1-\cos \left( \frac{360^\circ}{N} \right)\right)} $$
In the last equation r is the radius of the tip diameter. The m is any real non-negative and non zero number.
Thank you in advanced.
Here is a link contain an explanation for gears, also the place the picture was taken from.