A124442 a(n) = Product_{ceiling(n/2) <= k <= n, gcd(k,n)=1} k.
1, 1, 2, 3, 12, 5, 120, 35, 280, 63, 30240, 77, 665280, 1287, 16016, 19305, 518918400, 2431, 17643225600, 46189, 14780480, 1322685, 28158588057600, 96577, 4317650168832, 58503375, 475931456000, 75218625, 3497296636753920000, 215441, 202843204931727360000
Offset: 1
Keywords
Examples
The integers which are >= 9/2 and are <= 9 and which are coprime to 9 are 5, 7 and 8. So a(9) = 5*7*8 = 280.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..300
- J. B. Cosgrave, K. Dilcher, Extensions of the Gauss-Wilson Theorem, Integers: Electronic Journal of Combinatorial Number Theory, 8(2008)
Crossrefs
Cf. A124441.
Programs
-
Maple
a:=proc(n) local b,k: b:=1: for k from ceil(n/2) to n do if gcd(k,n)=1 then b:=b*k else b:=b fi od: b; end: seq(a(n),n=1..33); # Emeric Deutsch, Nov 03 2006
-
Mathematica
f[n_] := Times @@ Select[Range[Ceiling[n/2], n], GCD[ #, n] == 1 &];Table[f[n], {n, 30}] (* Ray Chandler, Nov 12 2006 *)
-
PARI
A124442(n)=prod(k=(n+1)\2,n-1, 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 A124442(n): return Gauss_factorial(n, n)/Gauss_factorial(n//2, n) [A124442(n) for n in (1..29)] # Peter Luschny, Oct 01 2012
Formula
Extensions
More terms from Emeric Deutsch, Nov 03 2006