
COMMENTS

There is a rough heuristic suggesting that a prime p will occur in this list with probability 1/p; the actual density seen here tails off faster than that. No other primes with this property exist up to 2^36. Used for testing a multiprecision division algorithm.
The sequence giving the leastmagnitude primitive roots r of primes p for which r is not a primitive root of p^2 begins 1,3,2,5,..., with no other cases known up to 2^36.


EXAMPLE

3 is a primitive root of 11. That is, the successive powers of 3 work through all the nonzero residues modulo 11 before coming round through 1 to 3 again: 3, 2, 5, 4, 1, 3, 2, 5, 4, 1, 3, ...
3 also happens to be the negative number of least magnitude with this property (1 obviously fails, 2 yields 2, 4, 3, 5, 1, 2 ...) Modulo 11^2 = 121, however, successive powers of 3 do not yield all the corresponding residues (that is, all the ones which aren't multiples of 11): we only get 3, 9, 27, 81, 1, 3, 9, 27, 81, 1, 3, ...
