OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..160
FORMULA
Let b(n) = n!/(3^floor(n/3)*floor(n/3)!) then a(n) = b(3*floor(n/2)+(-1)^(n+1)). # formula corrected Peter Luschny, Oct 03 2012
E.g.f.: 1/(1 - x*G(x^2/3)) - 1 where G(x) = 1 + x*G(x)^3 is the g.f. of A001764. - Paul D. Hanna, Jan 04 2014
E.g.f. A(x) satisfies: A'(x) = (1 + A(x))^3 * (1 + A(-x)). - Paul D. Hanna, Jan 04 2014
EXAMPLE
a(5) = 1*2*4*5*7 = 280.
MAPLE
a:= proc(n) a(n):= `if`(n=1, 1, (3*iquo(n, 2)-(-1)^n)*a(n-1)) end:
seq (a(n), n=1..25); # Alois P. Heinz, Oct 03 2012
MATHEMATICA
a[n_] := ((3*n-Mod[n, 2])/2)!/(3^((n-Mod[n, 2])/2)*((n-Mod[n, 2])/2)!); Table[a[n], {n, 1, 21}] (* Jean-François Alcover, Feb 25 2014 *)
FoldList[Times, Table[If[Divisible[n, 3], Nothing, n], {n, 40}]] (* Harvey P. Dale, Feb 28 2023 *)
PROG
(Sage)
def Gauss_factorial(N, n): return mul(j for j in (1..N) if gcd(j, n) == 1)
def A111394_list(n): return sorted(set([Gauss_factorial(j, 3) for j in (1..n)]))
A111394_list(28) # Peter Luschny, Oct 01 2012
(PARI) {a(n)=local(A, G=sum(k=0, n, binomial(3*k, k)/(2*k+1)*x^k +x*O(x^n))); A=1/(1-x*subst(G, x, x^2/3))-1; n!*polcoeff(A, n)} \\ Paul D. Hanna, Jan 04 2014
(PARI) {a(n)=local(A=x); for(i=0, n, A=intformal((1+A)^3*subst(1+A, x, -x +x*O(x^n))^1 +x*O(x^n) )); n!*polcoeff(A, n)} \\ Paul D. Hanna, Jan 04 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon Perry, Nov 11 2005
STATUS
approved