login
A248207
Primitive root of the multiplicative group mod n as returned by PARI version 2.7.2, or 0 when there is no primitive root.
0
1, 2, 3, 2, 5, 3, 0, 2, 7, 2, 0, 2, 3, 0, 0, 3, 11, 2, 0, 0, 13, 5, 0, 2, 15, 2, 0, 2, 0, 3, 0, 0, 3, 0, 0, 2, 21, 0, 0, 6, 0, 3, 0, 0, 5, 5, 0, 3, 27, 0, 0, 2, 29, 0, 0, 0, 31, 2, 0, 2, 3, 0, 0, 0, 0, 2, 0, 0, 0, 7, 0, 5, 39, 0, 0, 0, 0, 3, 0, 2, 47, 2, 0, 0, 3, 0, 0, 3, 0, 0, 0, 0, 5, 0, 0, 5, 3, 0, 0
OFFSET
2,2
PROG
(PARI)
a(n) = if(#znstar(n)[3]>1, 0, lift(znprimroot(n)));
vector(99, n, a(n+1))
CROSSREFS
Cf. A174621 (smallest primitive root, taking -1 for n with no primitive root).
Cf. A046145 (smallest primitive root, taking 0 for n with no primitive root).
Sequence in context: A132962 A046145 A103309 * A174621 A369029 A007967
KEYWORD
nonn
AUTHOR
Joerg Arndt, Jan 11 2015
STATUS
approved