Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #19 Dec 21 2024 20:06:39
%S 1,1,2,10,54,336,2400,19440,176400,1774080,19595520,235872000,
%T 3073593600,43110144000,647610163200,10374216652800,176536039680000,
%U 3180264062976000,60466862776320000,1210048630382592000,25423825985445888000,559567461880627200000,12874917427270778880000
%N G.f.: Sum_{n>=0} (n-x)^n * x^n / (1 + n*x - x^2)^n.
%F a(n) = (n-1)*(n+2)/2 * (n-1)!, for n>1 with a(0)=a(1)=1.
%F E.g.f.: 1/2 + 1/(2*(1-x)^2) + x + log(1-x).
%F E.g.f.: Sum_{n>=0} a(n+1)*x^n/n! = 1/(1-x)^3 - x/(1-x).
%F From _Amiram Eldar_, Dec 23 2022: (Start)
%F Sum_{n>=0} 1/a(n) = Pi^2/9 + 43/27.
%F Sum_{n>=0} (-1)^n/a(n) = Pi^2/18 - 4*log(2)/9 + 5/27. (End)
%e G.f.: A(x) = 1 + x + 2*x^2 + 10*x^3 + 54*x^4 + 336*x^5 + 2400*x^6 +...
%e where
%e 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 +...
%t a[n_] := Switch[n, 0|1, 1, _, (n-1)*(n+2)/2*(n-1)!];
%t Table[a[n], {n, 0, 30}] (* _Jean-François Alcover_, Aug 24 2022 *)
%o (PARI) {a(n)=polcoeff( sum(m=0, n, (m-x)^m*x^m/(1+m*x-x^2 +x*O(x^n))^m), n)}
%o for(n=0, 30, print1(a(n), ", "))
%o (PARI) {a(n)=if(n==0||n==1, 1, (n-1)*(n+2)/2 * (n-1)!)}
%o for(n=0, 30, print1(a(n), ", "))
%o (PARI) {a(n)=n!*polcoeff(1/2 + 1/(2*(1-x)^2) + x + log(1-x +x*O(x^n)), n)}
%o for(n=0, 30, print1(a(n), ", "))
%Y Cf. A187742, A187741, A187735, A187746.
%K nonn
%O 0,3
%A _Paul D. Hanna_, Jan 09 2013