%I #34 Oct 01 2021 21:58:51
%S 0,0,1,2,4,24,48,0,4032,17280,5400,0,518400,415134720,0,0,1797120,
%T 6467044147200,39086530560,0,0,1738201006080000,10247897088,0,
%U 9632530575360000,706822057112371200000,569299069913333760000,0,54538738974720000,0
%N Products of nonprimitive roots of n, or 0 if n = 2 or has no primitive roots.
%C If n is a prime p, a(n) == -1 (mod p) for n > 3; if n is a composite c, a(n) == 0 (mod c) for n > 4.
%e a(11) = 5400 because the primitive roots of 11 are {2,6,7,8} and therefore the nonprimitive roots of 11 are {1,3,4,5,9,10} and 1*3*4*5*9*10 = 5400.
%t a[n_] := If[n == 2 || (p = PrimitiveRootList[n]) == {}, 0, (n - 1)!/Times @@ p]; Array[a, 30] (* _Amiram Eldar_, Sep 26 2021 *)
%Y Cf. A123475, A219027, A219028.
%K nonn
%O 1,4
%A _Davide Rotondo_, Sep 26 2021