|
|
A001783
|
|
n-phi-torial, or phi-torial of n: Product k, 1 <= k <= n, k relatively prime to n.
(Formerly M0921 N0346)
|
|
36
|
|
|
1, 1, 2, 3, 24, 5, 720, 105, 2240, 189, 3628800, 385, 479001600, 19305, 896896, 2027025, 20922789888000, 85085, 6402373705728000, 8729721, 47297536000, 1249937325, 1124000727777607680000, 37182145, 41363226782215962624, 608142583125, 1524503639859200000
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
In other words, a(1) = 1 and for n >= 2, a(n) = product of the phi(n) numbers < n and relatively prime to n.
From Gauss's generalization of Wilson's theorem (see Weisstein link) it follows that, for n>1, a(n) == -1 (mod n) if and only if there exists a primitive root modulo n (cf. the Hardy and Wright reference, Theorem 129. p. 102). - Vladimir Shevelev, May 11 2012
Islam & Manzoor prove that a(n) is an injection for n > 1, see links. In other words, if a(m) = a(n), and min(m, n) > 1, then m = n. - Muhammed Hedayet, May 25 2016
Cosgrave & Dilcher propose the name Gauss factorial. Indeed the sequence is the special case N = n of the Gauss factorial N_n! = Product_{1<=j<=N, gcd(j, n)=1} j (see A216919). - Peter Luschny, Feb 07 2018
|
|
REFERENCES
|
G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Fifth ed., Clarendon Press, Oxford, 2003, Theorem 129, p. 102.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
S. W. Golomb and William Small, Problem E1045, Amer. Math. Monthly, 60 (1953), 422.
|
|
FORMULA
|
a(n) = n^phi(n)*Product_{d|n} (d!/d^d)^mu(n/d); phi=A000010 is the Euler totient function and mu=A008683 the Moebius function (Tom M. Apostol, Introduction to Analytic Number Theory, New York 1984, p. 48). - Franz Vrabec, Jul 08 2005
|
|
MAPLE
|
A001783 := proc(n) local i, t1; t1 := 1; for i from 1 to n do if gcd(i, n)=1 then t1 := t1*i; fi; od; t1; end;
A001783 := proc(n) local i; mul(i, i=select(k->igcd(n, k)=1, [$1..n])) end; # Peter Luschny, Oct 30 2010
|
|
MATHEMATICA
|
A001783[n_]:=Times@@Select[Range[n], CoprimeQ[n, #]&];
|
|
PROG
|
(PARI) a(n)=my(f=factor(n), t=n^eulerphi(f)); fordiv(f, d, t*=(d!/d^d)^moebius(n/d)); t \\ Charles R Greathouse IV, Nov 05 2015
(Haskell)
a001783 = product . a038566_row
(Sage)
def Gauss_factorial(N, n): return mul(j for j in (1..N) if gcd(j, n) == 1)
def A001783(n): return Gauss_factorial(n, n)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,nice,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|