OFFSET
3,2
COMMENTS
Gauss proved that the product of the primitive roots of p is congruent to 1 modulo p, for all primes p except p = 3.
REFERENCES
C. F. Gauss, Disquisitiones Arithmeticae, Yale, 1965; see p. 52.
LINKS
Wikipedia, Primitive root
EXAMPLE
The primitive roots of prime(4) = 7 are 3 and 5, and (3*5 - 1)/7 = 14/7 = 2, so a(4) = 2.
MATHEMATICA
a[n_] := With[{p = Prime[n]}, Select[Range[p - 1], MultiplicativeOrder[#, p] == p - 1 &]]; Table[(Product[ a[n][[i]], {i, Length[a[n]]}] - 1)/Prime[n], {n, 3, 20}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Jonathan Sondow, Feb 09 2013
STATUS
approved