%I #20 Sep 03 2023 11:10:19
%S 1,2,6,15,672,924,11642400,163800,109681110000,5590307923200,
%T 970377408,134088514560000,138960660963091968000,874927557504000,
%U 3456156426256013065185600000000,30688148115024695887527936000000
%N Product of the primitive roots of prime(n).
%C Except for n=2, we have a(n)=1 (mod prime(n)).
%D C. F. Gauss, Disquisitiones Arithmeticae, Yale, 1965; see p. 52.
%H Charles R Greathouse IV, <a href="/A123475/b123475.txt">Table of n, a(n) for n = 1..145</a>
%e a(5)=672 because the primitive roots of 11 are {2,6,7,8}.
%t PrimRoots[p_] := Select[Range[p-1], MultiplicativeOrder[ #,p]==p-1&]; Table[Times@@PrimRoots[Prime[n]], {n,20}]
%t Times@@@Table[PrimitiveRootList[Prime[n]], {n, 20}] (* _Harlan J. Brothers_, Sep 02 2023 *)
%o (PARI) vecprod(v)=prod(i=1,#v,v[i])
%o a(n,p=prime(n))=vecprod(select(n->znorder(Mod(n,p))==p-1,[2..p-1]))
%o apply(p->a(0,p), primes(20)) \\ _Charles R Greathouse IV_, May 15 2015
%o (Perl) use ntheory ":all"; sub list { my $n=shift; grep { znorder($_,$n) == $n-1 } 2..$n-1; } say vecprod(list($_)) for @{primes(nth_prime(20))}; # _Dana Jacobsen_, May 15 2015
%Y Cf. A060749 (primitive roots of prime(n)), A088144 (sum of primitive roots of prime(n)).
%K nonn
%O 1,2
%A _T. D. Noe_, Sep 27 2006
|