login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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