login
a(n) = Sum_{k=0..n} Stirling1(n,k)*Stirling2(n,k).
4

%I #11 Sep 08 2022 08:44:57

%S 1,1,0,-6,36,50,-6575,145222,-1489978,-49083480,4200404478,

%T -182031111702,4165517606173,176264238017452,-33427749628678925,

%U 2913726991238703330,-165770248921085801710,1422295225609567363172,1326793746164926878993976

%N a(n) = Sum_{k=0..n} Stirling1(n,k)*Stirling2(n,k).

%H G. C. Greubel, <a href="/A047792/b047792.txt">Table of n, a(n) for n = 0..295</a>

%p seq(add(stirling1(n, k)*stirling2(n, k), k = 0..n), n = 0..20); # _G. C. Greubel_, Aug 07 2019

%t Flatten[{1, Table[Sum[StirlingS1[n, k]*StirlingS2[n, k], {k, n}], {n,20}] }] (* _Vaclav Kotesovec_, Oct 13 2018 *)

%o (PARI) {a(n) = sum(k=0,n, stirling(n,k,1)*stirling(n,k,2))};

%o vector(20, n, n--; a(n)) \\ _G. C. Greubel_, Aug 07 2019

%o (Magma) [(&+[StirlingFirst(n,k)*StirlingSecond(n,k): k in [0..n]]): n in [0..20]]; // _G. C. Greubel_, Aug 07 2019

%o (Sage) [sum((-1)^(n-k)*stirling_number1(n,k)*stirling_number2(n,k) for k in (0..n)) for n in (0..20)] # _G. C. Greubel_, Aug 07 2019

%o (GAP) List([0..20], n-> Sum([0..n], k-> (-1)^(n-k)*Stirling1(n,k) *Stirling2(n,k) )); # _G. C. Greubel_, Aug 07 2019

%Y Cf. A008275, A008277, A047793, A047794, A047795.

%K sign

%O 0,4

%A _N. J. A. Sloane_