login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A124441
a(n) = Product_{1<=k<=n/2, gcd(k,n)=1} k.
5
1, 1, 1, 1, 2, 1, 6, 3, 8, 3, 120, 5, 720, 15, 56, 105, 40320, 35, 362880, 189, 3200, 945, 39916800, 385, 9580032, 10395, 3203200, 19305, 87178291200, 1001, 1307674368000, 2027025, 65228800, 2027025, 4839284736, 85085, 6402373705728000, 34459425, 17827532800
OFFSET
1,5
COMMENTS
a(n) divides A001783(n). - M. F. Hasler, Jul 23 2011
LINKS
J. B. Cosgrave and K. Dilcher, Extensions of the Gauss-Wilson Theorem, Integers: Electronic Journal of Combinatorial Number Theory, 8 (2008)
FORMULA
a(n) = A001783(n)/A124442(n). - M. F. Hasler, Jul 23 2011
EXAMPLE
The positive integers which are <= 9/2 and which are coprime to 9 are 1, 2 and 4. So a(9) = 1*2*4 = 8.
MAPLE
a:=proc(n) local b, k: b:=1: for k from 1 to floor(n/2) do if gcd(k, n)=1 then b:=b*k else b:=b fi od: b; end: seq(a(n), n=1..41); # Emeric Deutsch, Nov 03 2006
MATHEMATICA
f[n_] := Times @@ Select[Range[Floor[n/2]], GCD[ #, n] == 1 &]; Table[f[n], {n, 36}] (* Ray Chandler, Nov 12 2006 *)
PROG
(PARI) A124441(n)=prod(k=2, n\2, k^(gcd(k, n)==1)) \\ M. F. Hasler, Jul 23 2011
(Sage)
def Gauss_factorial(N, n): return mul(j for j in (1..N) if gcd(j, n) == 1)
def A124441(n): return Gauss_factorial(n//2, n)
[A124441(n) for n in (1..36)] # Peter Luschny, Oct 01 2012
CROSSREFS
Sequence in context: A062566 A126265 A293182 * A284475 A353660 A285355
KEYWORD
nonn
AUTHOR
Leroy Quet, Nov 01 2006
EXTENSIONS
More terms from Emeric Deutsch, Nov 03 2006
STATUS
approved