The number of bases mod in which has cycle length is the same as the number of Fractions , , ..., which have least Denominator .
See also Totient Function
References
Conway, J. H. and Guy, R. K. The Book of Numbers. New York: Springer-Verlag, pp. 167-168, 1996.