2,2

Table of n, a(n) for n=2..100.

(PARI)

a(n) = if(#znstar(n)[3]>1, 0, lift(znprimroot(n)));

vector(99, n, a(n+1))

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 A007967 A054494

Adjacent sequences: A248204 A248205 A248206 * A248208 A248209 A248210

nonn

Joerg Arndt, Jan 11 2015

approved