login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Please make a donation to keep the OEIS running. In 2018 we replaced the server with a faster one, added 20000 new sequences, and reached 7000 citations (often saying "discovered thanks to the OEIS").
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A051190 a(n) = Product_{k=1..n-1} gcd(k,n). 6
1, 1, 1, 2, 1, 12, 1, 16, 9, 80, 1, 3456, 1, 448, 2025, 2048, 1, 186624, 1, 1024000, 35721, 11264, 1, 573308928, 625, 53248, 59049, 179830784, 1, 1007769600000, 1, 67108864, 7144929, 1114112, 37515625, 160489808068608, 1, 4980736, 89813529 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

COMMENTS

a(n) > 1 if and only if n is composite. - Charles R Greathouse IV, Jan 04 2013

LINKS

T. D. Noe, Table of n, a(n) for n = 1..200

OEIS Wiki, Generalizations of the factorial

FORMULA

a(n) = Product_{ d divides n, d < n } d^phi(n/d). - Peter Luschny, Apr 07 2013

a(n) = A067911(n) / n. - Peter Luschny, Apr 07 2013

Product_{j=1..n} Product_{k=1..j-1} gcd(j,k), n >= 1. - Daniel Forgues, Apr 11 2013

a(n) = sqrt( (1/n) * (A092287(n) / A092287(n-1)) ). - Daniel Forgues, Apr 13 2013

MAPLE

A051190 := proc(n) local i; mul(igcd(n, i ), i = 1..(n-1)) end;

MATHEMATICA

a[n_] := If[PrimeQ[n], 1, Times @@ (GCD[n, #]& /@ Range[n-1])]; Table[a[n], {n, 1, 39}]  (* Jean-Fran├žois Alcover, Jul 18 2012 *)

Table[Times @@ GCD[n, Range[n-1]], {n, 50}] (* T. D. Noe, Apr 12 2013 *)

PROG

(Haskell)

a051190 n = product $ map (gcd n) [1..n-1]

-- Reinhard Zumkeller, Nov 22 2011

(PARI) a(n)=my(f=factor(n)); prod(i=1, #f[, 1], prod(j=1, f[i, 2], f[i, 1]^(n\f[i, 1]^j)))/n \\ Charles R Greathouse IV, Jan 04 2013

(PARI) a(n) = prod(k=1, n-1, gcd(k, n)); /* Joerg Arndt, Apr 14 2013 */

(Sage)

A051190 = lambda n: mul(gcd(n, i) for i in (1..n-1))

[A051190(n) for n in (1..39)] # Peter Luschny, Apr 07 2013

(Sage)

# A second, faster version, based on the prime factorization of a(n):

def A051190(n):

    R = 1

    if not is_prime(n) :

        for p in primes(n//2+1):

            s = 0; r = n; t = n-1

            while r > 0 :

                r = r//p; t = t//p

                s += (r-t)*(r+t-1)

            R *= p^(s/2)

    return R

[A051190(i) for i in (1..1000)]  # Peter Luschny, Apr 08 2013

CROSSREFS

Cf. A067911, A006579, A224479, A092287.

Sequence in context: A161150 A163088 A105608 * A072512 A271531 A118588

Adjacent sequences:  A051187 A051188 A051189 * A051191 A051192 A051193

KEYWORD

nonn,nice

AUTHOR

Antti Karttunen, Oct 21 1999

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 18 18:43 EST 2018. Contains 318243 sequences. (Running on oeis4.)