cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A124442 a(n) = Product_{ceiling(n/2) <= k <= n, gcd(k,n)=1} k.

Original entry on oeis.org

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

Views

Author

Leroy Quet, Nov 01 2006

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.
		

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

a(n) = A001783(n)/A124441(n). - M. F. Hasler, Jul 23 2011

Extensions

More terms from Emeric Deutsch, Nov 03 2006