OFFSET
0,3
COMMENTS
The Gauss factorial n_k! is defined to be Product_{1<=j<=n, gcd(j,k)=1} j.
LINKS
Robert Israel, Table of n, a(n) for n = 0..542
J. B. Cosgrave and K. Dilcher, An introduction to Gauss factorials, Amer. Math. Monthly, 118 (2011), 810-828.
J. B. Cosgrave and K. Dilcher, The Gauss-Wilson theorem for quarter-intervals, Acta Mathematica Hungarica, Sept. 2013.
FORMULA
From Robert Israel, Mar 06 2017: (Start)
a(n) = a(n-1) if 5 | n; otherwise n*a(n-1).
a(n) = n!/(5^floor(n/5)*floor(n/5)!). (End)
MAPLE
Gf:=proc(N, n) local j, k; k:=1;
for j from 1 to N do if gcd(j, n)=1 then k:=j*k; fi; od; k; end;
f:=n->[seq(Gf(N, n), N=0..40)];
f(5);
MATHEMATICA
Table[n!/(5^#*#!) &@ Floor[n/5], {n, 0, 25}] (* Michael De Vlieger, Mar 06 2017 *)
PROG
(Magma) k:=5; [IsZero(n) select 1 else &*[j: j in [1..n] | IsOne(GCD(j, k))]: n in [0..30]]; // Bruno Berselli, Dec 10 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Dec 08 2013
STATUS
approved