%I #24 Jan 20 2024 09:18:09
%S 1,3,2,13,10,6,75,62,42,24,541,466,342,216,120,4683,4142,3210,2184,
%T 1320,720,47293,42610,34326,24696,15960,9360,5040,545835,498542,
%U 413322,310344,211560,131760,75600,40320,7087261,6541426,5544342,4304376,3063000,2005200,1214640,685440,362880,102247563,95160302
%N Triangle of F(n,r) of r-geometric numbers, 1 <= r <= n.
%H S. Alex Bradt, Jennifer Elder, Pamela E. Harris, Gordon Rojas Kirby, Eva Reutercrona, Yuxuan (Susan) Wang, and Juliet Whidden, <a href="https://arxiv.org/abs/2401.06937">Unit interval parking functions and the r-Fubini numbers</a>, arXiv:2401.06937 [math.CO], 2024. See Table 1 at page 9.
%H A. Dil and V. Kurt, <a href="http://dx.doi.org/10.2298/AADM110615015D">Polynomials related to harmonic numbers and evaluation of harmonic number series, II</a>, Appl. An. Disc. Math. 5 (2011) 212-229, section 3.2.
%F F(n,r) = Sum_{k=0..n} {n over k}_r *k!.
%e [1] 1;
%e [2] 3, 2;
%e [3] 13, 10, 6;
%e [4] 75, 62, 42, 24;
%e [5] 541, 466, 342, 216, 120;
%e [6] 4683, 4142, 3210, 2184, 1320, 720;
%p Stirr := proc(n,k,r)
%p option remember;
%p if n < r then
%p 0;
%p elif n = r then
%p if k = r then
%p 1 ;
%p else
%p 0 ;
%p end if;
%p else
%p procname(n-1,k-1,r) + k*procname(n-1,k,r) ;
%p end if;
%p end proc:
%p A := proc(n,r)
%p add( k!*Stirr(n,k,r),k=0..n) ;
%p end proc:
%p seq(seq( A(n,r),r=1..n),n=1..12) ;
%t Stirr[n_, k_, r_] := Stirr[n, k, r] = Which[n < r, 0, n == r, If[k == r, 1, 0], True, Stirr[n-1, k-1, r] + k*Stirr[n-1, k, r]]; a[n_, r_] := Sum[ k!*Stirr[n, k, r], {k, 0, n}]; Table[Table[a[n, r], {r, 1, n}], {n, 1, 12}] // Flatten (* _Jean-François Alcover_, Jan 10 2014, translated from Maple *)
%t Fubini[n_, r_] := Sum[k!*Sum[(-1)^(i+k+r)*(i+r)^(n-r)/(i!*(k-i-r)!), {i, 0, k-r}], {k, r, n}]; Table[Fubini[n, r], {n, 1, 10}, {r, 1, n}] // Flatten (* _Jean-François Alcover_, Mar 30 2016 *)
%o (Sage)
%o @CachedFunction
%o def stirling_number2r(n, k, r) :
%o if n < r: return 0
%o if n == r: return 1 if k == r else 0
%o return stirling_number2r(n-1,k-1,r)+ k*stirling_number2r(n-1,k,r)
%o def A219374(n, r):
%o return add(factorial(k)*stirling_number2r(n, k, r) for k in (0..n))
%o for n in (1..6):
%o print([A219374(n, r) for r in (1..n)]) # _Peter Luschny_, Nov 19 2012
%Y Cf. A008277 {n over k}_1, A143494 {n over k}_2, A143495 {n over k}_3, A000670 (first column).
%K tabl,nonn,easy
%O 1,2
%A _R. J. Mathar_, Nov 19 2012