This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A199673 #50 Sep 08 2022 08:46:00 %S A199673 1,2,2,3,12,6,4,48,72,24,5,160,540,480,120,6,480,3240,5760,3600,720,7, %T A199673 1344,17010,53760,63000,30240,5040,8,3584,81648,430080,840000,725760, %U A199673 282240,40320,9,9216,367416,3096576,9450000,13063680,8890560,2903040,362880 %N A199673 Number of ways to form k labeled groups, each with a distinct leader, using n people. Triangle T(n,k) = n!*k^(n-k)/(n-k)! for 1 <= k <= n. %C A199673 T(n,1)=n since there are n choices for the leader of the single group. Also, T(n,n)=n! since each of the n groups consist solely of a leader and there are n! ways to assign the n people to the n labeled groups. %C A199673 In general, T(n,k) = n!*k^(n-k)/(n-k)! since there are n!/(n-k)! ways to assign leaders to the k labeled groups and there are k^(n-k) ways to map the remaining (n-k) people to the k groups. %C A199673 T(n,k) is the number of functions of [n] to an arbitrary k-subset of [n], where each of the k target values is used at least once. %C A199673 The number of ways to distribute n different toys among k girls and k boys to that each girl gets exactly one toy. - _Dennis P. Walsh_, Sep 10 2012 %H A199673 Joerg Arndt, <a href="/A199673/b199673.txt">Table of n, a(n) for n = 1..561</a> %H A199673 George Kesidis, Takis Konstantopoulos, and Michael A. Zazanis, <a href="https://arxiv.org/abs/2104.08050">Age of information without service preemption</a>, arXiv:2104.08050 [cs.PF], 2021. %H A199673 Dennis P. Walsh, <a href="http://frank.mtsu.edu/~dwalsh/GROUPCNT.pdf">Assigning people into labeled groups with leaders</a> %H A199673 Dennis P. Walsh, <a href="http://frank.mtsu.edu/~dwalsh/TOYE2.pdf">Toy Story 2</a> %F A199673 T(n,k) = n!*k^(n-k)/(n-k)! = k!*k^(n-k)*binomial(n,k) for 1 <= k <= n. %F A199673 E.g.f.: (x*e^x)^k,for fixed k. %F A199673 T(n,k1+k2) = Sum_{j=0..n} binomial(n,j)*T(j,k1)*T(n-j,k2). %F A199673 T(n,1) = A000027(n); %F A199673 T(n,2) = A001815(n); %F A199673 T(n,3) = A052791(n); %F A199673 Sum_{k=1..n} T(n,k) = A006153(n). %F A199673 T(n,n) = A000142(n) = n!. - _Dennis P. Walsh_, Sep 10 2012 %e A199673 T(3,2)=12 since there are 12 ways to form group 1 and group 2, both with leaders, using people p1, p2, and p3, as illustrated below. The leader will be denoted Lj if person pj is designated the leader of the group. %e A199673 Group 1 Group 2 %e A199673 {L1,p2} {L3} %e A199673 {L1,p3} {L2} %e A199673 {L1} {L2,p3} %e A199673 {L1} {p2,L3} %e A199673 {L2,p1} {L3} %e A199673 {L2,p3} {L1} %e A199673 {L2} {L1,p3} %e A199673 {L2} {p1,L3} %e A199673 {L3,p2} {L1} %e A199673 {L3,p1} {L2} %e A199673 {L3} {L1,p2} %e A199673 {L3} {p1,L2} %e A199673 First rows of triangle T(n,k): %e A199673 1; %e A199673 2, 2; %e A199673 3, 12, 6; %e A199673 4, 48, 72, 24; %e A199673 5, 160, 540, 480, 120; %e A199673 6, 480, 3240, 5760, 3600, 720; %e A199673 7, 1344, 17010, 53760, 63000, 30240, 5040; %e A199673 8, 3584, 81648, 430080, 840000, 725760, 282240, 40320; %e A199673 9, 9216, 367416, 3096576, 9450000, 13063680, 8890560, 2903040, 362880; %p A199673 seq(seq(n!*k^(n-k)/(n-k)!, k=1..n), n=1..9); %t A199673 nn = 10; a = y x Exp[x]; f[list_] := Select[list, # > 0 &]; Drop[Map[f, Range[0, nn]! CoefficientList[Series[1/(1 - a) , {x, 0, nn}], {x, y}]], 1] // Flatten (* _Geoffrey Critzer_, Jan 21 2012 *) %o A199673 (Magma) [Factorial(n)*k^(n-k)/Factorial(n-k): k in [1..n], n in [1..9]]; // _Bruno Berselli_, Nov 09 2011 %o A199673 (PARI) %o A199673 T(n,k)=n!*k^(n-k)/(n-k)!; %o A199673 /* print triangle: */ %o A199673 for (n=1, 15, for (k=1,n, print1(T(n,k),", ")); print() ); %o A199673 /* _Joerg Arndt_, Sep 21 2012 */ %K A199673 nonn,easy,tabl %O A199673 1,2 %A A199673 _Dennis P. Walsh_, Nov 08 2011