login
a(n) = Product_{i=1..n} i / gcd(i,n).
5

%I #21 Sep 08 2022 08:45:25

%S 1,1,2,3,24,10,720,315,4480,4536,3628800,11550,479001600,13899600,

%T 43051008,638512875,20922789888000,1905904000,6402373705728000,

%U 118794043368,68108451840000,4535772564960000,1124000727777607680000

%N a(n) = Product_{i=1..n} i / gcd(i,n).

%C If p is prime, then a(p) = (p-1)!. - _Stefan Steinerberger_, Jun 08 2006

%F a(n) = Product_{d|n} pxi(d), where pxi(m) = is the product of totatives of m (A001783). - _Jaroslav Krizek_, Dec 28 2016

%F a(n) = A000142(n)/A067911(n). - _Ridouane Oudra_, Nov 20 2021

%p a:=n->mul(numer (k/n), k=1..n): seq(a(n), n=1..23); # _Zerinvary Lajos_, Apr 26 2008

%t a[n_] := Product[i/GCD[i, n], {i, 1, n}]; Table[a[n], {n, 1, 30}] (* _Stefan Steinerberger_, Jun 08 2006 *)

%t Table[Product[Times @@ Select[Range@ d, CoprimeQ[#, d] &], {d, Divisors@ n}], {n, 23}] (* _Michael De Vlieger_, Dec 28 2016 *)

%o (PARI) a(n) = prod(i=1,n,i/gcd(i,n))

%o (Magma) [&*[&*[h: h in [1..d] | GCD(h,d) eq 1]: d in Divisors(n)]: n in [1..100]]; // _Jaroslav Krizek_, Dec 28 2016

%Y Cf. A067911.

%Y Cf. A000142, A067911.

%K nonn

%O 1,3

%A _Martin Fuller_, Jun 06 2006

%E More terms from _Stefan Steinerberger_, Jun 08 2006