%I #27 Apr 21 2021 04:34:21
%S 0,0,2,9,40,195,1056,6321,41392,293607,2237920,18210093,157329096,
%T 1436630091,13810863808,139305550065,1469959371232,16184586405327,
%U 185504221191744,2208841954063317,27272621155678840,348586218389733555,4605223387997411872,62797451641106266329,882730631284319415504
%N Second column of triangle in A235595.
%H Alois P. Heinz, <a href="/A235596/b235596.txt">Table of n, a(n) for n = 1..200</a>
%F a(n) = A000248(n-1) - 1. - _Alois P. Heinz_, Jun 21 2019
%e G.f. = 2*x^3 + 9*x^4 + 40*x^5 + 195*x^6 + 1056*x^7 + 6321*x^8 + 41392*x^9 + ...
%t gf[k_] := gf[k] = If[k == 0, x, x*E^gf[k-1]]; a[n_, k_] := n!*Coefficient[Series[gf[k], {x, 0, n+1}], x, n]; a[n_] := (a[n, 2] - a[n, 1])/n; Array[a, 25] (* _Jean-François Alcover_, Mar 18 2014, after _Alois P. Heinz_ *)
%t Table[Sum[BellY[n - 1, k, Range[n - 1]], {k, 0, n - 2}], {n, 1, 25}] (* _Vladimir Reshetnikov_, Nov 09 2016 *)
%o (Python)
%o from sympy import binomial
%o from sympy.core.cache import cacheit
%o @cacheit
%o def b(n, h): return 1 if min(n, h)==0 else sum([binomial(n - 1, j - 1)*j*b(j - 1, h - 1)*b(n - j, h) for j in range(1, n + 1)])
%o def a(n): return b(n - 1, 1) - b(n - 1, 0)
%o print([a(n) for n in range(1, 31)]) # _Indranil Ghosh_, Aug 26 2017
%Y Cf. A000248, A235595.
%K nonn
%O 1,3
%A _N. J. A. Sloane_, Jan 15 2014