login
Erlang C queues type triangular sequence based on A122525.
3

%I #5 Jan 06 2022 15:41:54

%S 1,1,1,2,2,3,6,9,22,41,24,64,266,708,1486,120,625,4536,17457,48088,

%T 108129,720,7776,100392,563088,2043864,5709120,13399176,5040,117649,

%U 2739472,22516209,107972560,375217945,1053757584,2544404617,40320,2097152,89020752,1076444064,6831882992,29566405440,99420254352,279663595232,688833593904

%N Erlang C queues type triangular sequence based on A122525.

%H G. C. Greubel, <a href="/A137216/b137216.txt">Rows n = 0..50 of the triangle, flattened</a>

%F T(n, k) = (1/n)*( n^n * k^(n+1) - n! * (k - 1) * Sum_{j=0..n} (n*k)^j/j! ), with T(n, 0) = n! and T(n, 1) = n^(n-1).

%e Triangle begins as:

%e 1;

%e 1, 1;

%e 2, 2, 3;

%e 6, 9, 22, 41;

%e 24, 64, 266, 708, 1486;

%e 120, 625, 4536, 17457, 48088, 108129;

%e 720, 7776, 100392, 563088, 2043864, 5709120, 13399176;

%t T[n_, k_]:= If[k==0, n!, If[k==1, n^(n-1), (1/n)*(k^(n+1)*n^n - n!*(k-1)*Sum[n^j*k^j/j!, {j,0,n}])]];

%t Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* modified by _G. C. Greubel_, Jan 06 2022 *)

%o (Sage)

%o @CachedFunction

%o def A137216(n, k):

%o if (k==0): return factorial(n)

%o elif (k==1): return n^(n-1)

%o else: return (1/n)*(k^(n+1)*n^n - factorial(n)*(k-1)*sum((n*k)^j/factorial(j) for j in (0..n)))

%o flatten([[A137216(n, k) for k in (0..n)] for n in (0..12)]) # _G. C. Greubel_, Jan 06 2022

%Y Cf. A122525, A137227.

%K nonn,tabl

%O 0,4

%A _Roger L. Bagula_, Mar 06 2008

%E Edited by _G. C. Greubel_, Jan 06 2022