%I #37 Jan 20 2024 03:49:02
%S 1,1,2,5,14,44,155,607,2617,12306,62587,341790,1991916,12324031,
%T 80587935,554826429,4008364544,30299290911,239019427636,1963239741712,
%U 16755637216417,148317595764043,1359380603278377,12880841117125364,126007744452786277,1270998629233371388
%N Number of modified ascent sequences of length n avoiding the pattern 221.
%H Giulio Cerbai, <a href="https://arxiv.org/abs/2401.10027">Pattern-avoiding modified ascent sequences</a>, arXiv:2401.10027 [math.CO], 2024.
%F a(n) = Sum_{k=1..n} Sum_{i=1..k} S2(k-1,i-1) * binomial(n-1-k+i,i-1) for n >= 1, a(0)=1, where S2(n,i) are the Stirling numbers of the second kind.
%e The shortest modified ascent sequence that contains 221 is 1221.
%t a[0]=1; a[n_]:=Sum[Sum[StirlingS2[k-1,i-1] Binomial[n-1-k+i,i-1],{i,k}],{k,n}]; Array[a,26,0] (* _Stefano Spezia_, Jan 20 2024 *)
%Y Cf. A022493 (all modified ascents).
%K nonn
%O 0,3
%A _Giulio Cerbai_, Jan 19 2024