OFFSET
0,4
COMMENTS
This is an enumeration of the disjoint union (with repetition) of A001710(n), for n > 0, and A000142(n), for n > 0. The first lists the orders of the alternating groups; the second lists the orders of the symmetric groups. - Hal M. Switkay, Mar 13 2023
FORMULA
G.f.: 1/2 + (1+2*x) * Sum_{n>=0} (n+1)!*x^(2*n)/2.
a(2*n) = (n+1)!/2, a(2*n-1) = n!, for n>0 with a(0)=1.
From Amiram Eldar, Dec 11 2022: (Start)
Sum_{n>=0} 1/a(n) = 3*e - 4.
Sum_{n>=0} (-1)^n/a(n) = e - 2. (End)
EXAMPLE
G.f.: A(x) = 1 + x + x^2 + 2*x^3 + 3*x^4 + 6*x^5 + 12*x^6 + 24*x^7 + 60*x^8 +...
where
A(x) = 1 + (1+x)*x/(1+x+x^2) + (1+2*x)^2*x^2/(1+x+2*x^2)^2 + (1+3*x)^3*x^3/(1+x+3*x^2)^3 + (1+4*x)^4*x^4/(1+x+4*x^2)^4 + (1+5*x)^5*x^5/(1+x+5*x^2)^5 +...
MATHEMATICA
a[n_] := If[OddQ[n], ((n + 1)/2)!, (n/2 + 1)!/2]; a[0] = 1; Array[a, 32, 0] (* Amiram Eldar, Dec 11 2022 *)
PROG
(PARI) {a(n)=polcoeff( sum(m=0, n, (x+m*x^2)^m / (1 + x+m*x^2 +x*O(x^n))^m), n)}
for(n=0, 40, print1(a(n), ", "))
(PARI) {a(n)=if(n==0, 1, if(n%2==0, ((n+2)/2)!/2, ((n+1)/2)! ))}
for(n=0, 30, print1(a(n), ", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Jan 03 2013
STATUS
approved