OFFSET
0,3
FORMULA
a(n) = (n-1)*(n+2)/2 * (n-1)!, for n>1 with a(0)=a(1)=1.
E.g.f.: 1/2 + 1/(2*(1-x)^2) + x + log(1-x).
E.g.f.: Sum_{n>=0} a(n+1)*x^n/n! = 1/(1-x)^3 - x/(1-x).
From Amiram Eldar, Dec 23 2022: (Start)
Sum_{n>=0} 1/a(n) = Pi^2/9 + 43/27.
Sum_{n>=0} (-1)^n/a(n) = Pi^2/18 - 4*log(2)/9 + 5/27. (End)
EXAMPLE
G.f.: A(x) = 1 + x + 2*x^2 + 10*x^3 + 54*x^4 + 336*x^5 + 2400*x^6 +...
where
A(x) = 1 + (1-x)*x/(1+x-x^2) + (2-x)^2*x^2/(1+2*x-x^2)^2 + (3-x)^3*x^3/(1+3*x-x^2)^3 + (4-x)^4*x^4/(1+4*x-x^2)^4 + (5-x)^5*x^5/(1+5*x-x^2)^5 +...
MATHEMATICA
a[n_] := Switch[n, 0|1, 1, _, (n-1)*(n+2)/2*(n-1)!];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Aug 24 2022 *)
PROG
(PARI) {a(n)=polcoeff( sum(m=0, n, (m-x)^m*x^m/(1+m*x-x^2 +x*O(x^n))^m), n)}
for(n=0, 30, print1(a(n), ", "))
(PARI) {a(n)=if(n==0|n==1, 1, (n-1)*(n+2)/2 * (n-1)!)}
for(n=0, 30, print1(a(n), ", "))
(PARI) {a(n)=n!*polcoeff(1/2 + 1/(2*(1-x)^2) + x + log(1-x +x*O(x^n)), n)}
for(n=0, 30, print1(a(n), ", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Jan 09 2013
STATUS
approved