OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
2 has multiplicative order 20 mod 41, 3 has order 8 mod 41 so neither is a primitive root. The subgroup 2 and 3 generate together will have order lcm(20,8) = 40 so 2 and 3 generate all nonzero residues.
PROG
(PARI) is(n)=if(n>40 && isprime(n), my(a=znorder(Mod(2, n)), b); if(a==n-1, return(0)); b=znorder(Mod(3, n)); b<n-1 && lcm(a, b)==n-1, 0) \\ Charles R Greathouse IV, May 19 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
John L. Drost, May 19 2013
STATUS
approved