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.

Showing 1-4 of 4 results.

A001783 n-phi-torial, or phi-torial of n: Product k, 1 <= k <= n, k relatively prime to n.

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

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).

Crossrefs

Main diagonal gives A216919.

Programs

  • Haskell
    a001783 = product . a038566_row
    -- Reinhard Zumkeller, Mar 04 2012, Aug 26 2011
    
  • 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,#]&];
    Array[A001783,20] (* Enrique Pérez Herrero, Jul 23 2011 *)
  • PARI
    A001783(n)=prod(k=2,n-1,k^(gcd(k,n)==1))  \\ M. F. Hasler, Jul 23 2011
    
  • 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
    
  • 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)
    [A001783(n) for n in (1..25)] # Peter Luschny, Oct 01 2012

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
a(n) = n!/A066570(n). - R. J. Mathar, Mar 10 2011
A001221(a(n)) = A000720(n) - A001221(n) = A048865(n).
A006530(a(n)) = A136548(n). - Enrique Pérez Herrero, Jul 23 2011
a(n) = A124441(n)*A124442(n). - M. F. Hasler, Jul 23 2011
a(n) == (-1)^A211487(n) (mod n). - Vladimir Shevelev, May 13 2012
a(n) = A250269(n) / A193679(n). - Daniel Suteu, Apr 05 2021

Extensions

More terms from James Sellers, Dec 23 1999

A216919 The Gauss factorial N_n! for N >= 0, n >= 1, square array read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 6, 1, 1, 1, 24, 3, 2, 1, 1, 120, 3, 2, 1, 1, 1, 720, 15, 8, 3, 2, 1, 1, 5040, 15, 40, 3, 6, 1, 1, 1, 40320, 105, 40, 15, 24, 1, 2, 1, 1, 362880, 105, 280, 15, 24, 1, 6, 1, 1, 1, 3628800, 945, 2240, 105, 144, 5, 24, 3, 2, 1, 1, 39916800, 945
Offset: 1

Views

Author

Peter Luschny, Oct 01 2012

Keywords

Comments

The term is due to Cosgrave & Dilcher. The Gauss factorial should not be confused with the q-factorial [n]_q! which is also called Gaussian factorial.

Examples

			[n\N][0, 1, 2, 3,  4,   5,   6,    7,     8,      9,     10]
------------------------------------------------------------
[  1] 1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800 [A000142]
[  2] 1, 1, 1, 3,  3,  15,  15,  105,   105,    945,     945 [A055634, A133221]
[  3] 1, 1, 2, 2,  8,  40,  40,  280,  2240,   2240,   22400 [A232980]
[  4] 1, 1, 1, 3,  3,  15,  15,  105,   105,    945,     945
[  5] 1, 1, 2, 6, 24,  24, 144, 1008,  8064,  72576,   72576 [A232981]
[  6] 1, 1, 1, 1,  1,   5,   5,   35,    35,     35,      35 [A232982]
[  7] 1, 1, 2, 6, 24, 120, 720,  720,  5760,  51840,  518400 [A232983]
[  8] 1, 1, 1, 3,  3,  15,  15,  105,   105,    945,     945
[  9] 1, 1, 2, 2,  8,  40,  40,  280,  2240,   2240,   22400
[ 10] 1, 1, 1, 3,  3,   3,   3,   21,    21,    189,     189 [A232984]
[ 11] 1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800 [A232985]
[ 12] 1, 1, 1, 1,  1,   5,   5,   35,    35,     35,      35
[ 13] 1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800
		

Crossrefs

A000142(n) = n! = Gauss_factorial(n, 1).
A001147(n) = Gauss_factorial(2*n, 2).
A055634(n) = Gauss_factorial(n, 2)*(-1)^n.
A001783(n) = Gauss_factorial(n, n).
A124441(n) = Gauss_factorial(floor(n/2), n).
A124442(n) = Gauss_factorial(n, n)/Gauss_factorial(floor(n/2), n).
A066570(n) = Gauss_factorial(n, 1)/Gauss_factorial(n, n).

Programs

  • Maple
    A:= (n, N)-> mul(`if`(igcd(j, n)=1, j, 1), j=1..N):
    seq(seq(A(n, d-n), n=1..d), d=1..12);  # Alois P. Heinz, Oct 03 2012
  • Mathematica
    GaussFactorial[m_, n_] := Product[ If[ GCD[j, n] == 1, j, 1], {j, 1, m}]; Table[ GaussFactorial[m - n, n], {m, 1, 12}, {n, 1, m}] // Flatten (* Jean-François Alcover, Mar 18 2013 *)
  • PARI
    T(m,n)=prod(k=2, m, if(gcd(k,n)==1, k, 1))
    for(s=1,10,for(n=1,s,print1(T(s-n,n)", "))) \\ Charles R Greathouse IV, Oct 01 2012
  • Sage
    def Gauss_factorial(N, n): return mul(j for j in (1..N) if gcd(j, n) == 1)
    for n in (1..13): [Gauss_factorial(N, n) for N in (0..10)]
    

Formula

N_n! = product_{1<=j<=N, GCD(j,n)=1} j.

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

A193340 Terms of A001783 which are smaller than the preceding term in that sequence.

Original entry on oeis.org

1, 5, 105, 189, 385, 19305, 85085, 8729721, 1249937325, 37182145, 608142583125, 1452095555625, 215656441, 191898783962510625, 372509404162520625, 29248404810625, 431620764875678503125, 4873615036539089841, 181101347337625, 1553338924739899476440625
Offset: 1

Views

Author

M. F. Hasler, Jul 23 2011

Keywords

Comments

Appears to be a subsequence of A124441.

Crossrefs

Cf. A193338, A193339 for record values in A001783.

Programs

  • PARI
    m=9;for(n=1,99,m+0>(m=A001783(n)) && print1(m", "))
Showing 1-4 of 4 results.