Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #28 Nov 20 2024 04:18:43
%S 1,2,6,3,18,36,4,36,144,240,5,60,360,1200,1800,6,90,720,3600,10800,
%T 15120,7,126,1260,8400,37800,105840,141120,8,168,2016,16800,100800,
%U 423360,1128960,1451520
%N Triangle read by rows: T(n,k) (n>=1, 2<=k<=n+1) is the number of k-sequences of balls colored with at most n colors such that exactly one ball is of a color seen previously in the sequence.
%C Number of k-sequences of balls colored with at most n colors such that exactly two balls are the same color as some other ball in the sequence (necessarily each other). - _Jeremy Dover_, Sep 26 2017
%H Jeremy Dover, <a href="/A281881/b281881.txt">Table of n, a(n) for n = 1..999</a>
%H Jeremy Dover, <a href="http://math.stackexchange.com/a/2109013/342250">Answer to Cumulative Distribution Function of Collision Counts</a>
%F T(n,k) = binomial(k,2)*n!/(n+1-k)!.
%F T(n,k) = n*T(n-1,k-1) + (k-1)*n!/(n+1-k)!.
%e n=1 => AA -> T(1,2) = 1.
%e n=2 => AA, BB -> T(2,2) = 2; AAB, ABA, BAA, BBA, BAB, ABB -> T(2,3) = 6.
%e Triangle starts:
%e 1
%e 2, 6
%e 3, 18, 36
%e 4, 36, 144, 240
%e 5, 60, 360, 1200, 1800
%e 6, 90, 720, 3600, 10800, 15120
%e 7, 126, 1260, 8400, 37800, 105840, 141120
%e 8, 168, 2016, 16800, 100800, 423360, 1128960, 1451520
%e 9, 216, 3024, 30240, 226800, 1270080, 5080320, 13063680, 16329600
%e 10, 270, 4320, 50400, 453600, 3175200, 16934400, 65318400, 163296000, 199584000
%t Table[Binomial[k, 2] n!/(n + 1 - k)!, {n, 8}, {k, 2, n + 1}] // Flatten (* _Michael De Vlieger_, Feb 02 2017 *)
%Y Columns of table:
%Y T(n,2) = A000027(n)
%Y T(n,3) = A028896(n)
%Y Other sequences in table:
%Y T(n,n+1) = A001286(n)
%Y T(n,n) = A001804(n), n>=2
%K nonn,tabl
%O 1,2
%A _Jeremy Dover_, Feb 01 2017