For an integer n, let
G
(
n
)
G(n)
denote the smallest x such that the primes
≤
x
\leq x
generate the multiplicative group modulo n. We offer heuristic arguments and numerical data supporting the idea that
\[
G
(
n
)
≤
(
log
2
)
−
1
log
n
log
log
n
G(n) \leq {(\log 2)^{ - 1}}\log n\log \log n
\]
asymptotically. We believe that the coefficient
1
/
log
2
1/\log 2
is optimal. Finally, we show the average value of
G
(
n
)
G(n)
for
n
≤
N
n \leq N
is at least
\[
(
1
+
o
(
1
)
)
log
log
N
log
log
log
N
,
(1 + o(1))\log \log N\log \log \log N,
\]
and give a heuristic argument that this is also an upper bound. This work gives additional evidence, independent of the ERH, that primality testing can be done in deterministic polynomial time; if our bound on
G
(
n
)
G(n)
is correct, there is a deterministic primality test using
O
(
log
n
)
2
O{(\log n)^2}
multiplications modulo n.