login
a(0)=1/2, a(1)=1; a(n) = n*a(n-1) + (n-2)*a(n-2) - 2*Sum_{j=1..n-1} a(j)*a(n-j) + 2*Sum_{j=0..n-1} a(j)*a(n-1-j).
5

%I #25 Jun 16 2021 14:44:22

%S 1,2,5,14,45,170,777,4350,29513,236530,2179133,22576206,258821269,

%T 3245286490,44115311969,645664173566,10117122765905,168922438409826,

%U 2993228077070645,56090022818326542,1108099905463382973,23015655499699484810,501356717394207256441

%N a(0)=1/2, a(1)=1; a(n) = n*a(n-1) + (n-2)*a(n-2) - 2*Sum_{j=1..n-1} a(j)*a(n-j) + 2*Sum_{j=0..n-1} a(j)*a(n-1-j).

%C The sequence officially starts with a(0)=1/2, but since the OEIS only uses integers, we show it with offset 1.

%H Eric M. Schmidt, <a href="/A259871/b259871.txt">Table of n, a(n) for n = 1..300</a>

%H Richard J. Martin, and Michael J. Kearney, <a href="http://dx.doi.org/10.1007/s00493-014-3183-3">Integral representation of certain combinatorial recurrences</a>, Combinatorica: 35:3 (2015), 309-315.

%F Martin and Kearney (2015) give a g.f.

%F a(n) ~ (n-1)! / exp(1) * (1 + 4/n + 16/n^2 + 76/n^3 + 416/n^4 + 2576/n^5 + 17840/n^6 + 137268/n^7 + 1170104/n^8 + 11050940/n^9 + 115885968/n^10), for coefficients see A260949. - _Vaclav Kotesovec_, Jul 29 2015

%t nmax = 25; Rest[CoefficientList[Assuming[Element[x, Reals], Series[-1/(2*ExpIntegralEi[1 + 1/x]/Exp[1 + 1/x] - 1)/2, {x, 0, nmax}]], x]] (* _Vaclav Kotesovec_, Aug 05 2015 *)

%o (Sage)

%o @CachedFunction

%o def a(n) : return 1 if n==1 else 2 if n==2 else (n+2)*a(n-1) + (n-2)*a(n-2) - 2*sum(a(j)*a(n-j) for j in [1..n-1]) + 2*sum(a(j)*a(n-1-j) for j in [1..n-2])

%Y Cf. A259869, A259870, A259872, A260949.

%K nonn,easy

%O 1,2

%A _N. J. A. Sloane_, Jul 09 2015

%E More terms from _Eric M. Schmidt_, Jul 10 2015

%E The offset 1 is correct. - _N. J. A. Sloane_, Jun 16 2021