login
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

%I #14 Jan 25 2015 21:05:44

%S 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,

%T 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,

%U 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

%N Primitive root of the multiplicative group mod n as returned by PARI version 2.7.2, or 0 when there is no primitive root.

%o (PARI)

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

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

%Y Cf. A174621 (smallest primitive root, taking -1 for n with no primitive root).

%Y Cf. A046145 (smallest primitive root, taking 0 for n with no primitive root).

%K nonn

%O 2,2

%A _Joerg Arndt_, Jan 11 2015