A292879 Triangle read by rows: T(n,k) (n>=1, 4<=k<=n+3) is the number of k-sequences of balls colored with at most n colors such that exactly three balls are of a color seen previously in the sequence.
1, 2, 30, 3, 90, 540, 4, 180, 2160, 8400, 5, 300, 5400, 42000, 126000, 6, 450, 10800, 126000, 756000, 1905120, 7, 630, 18900, 294000, 2646000, 13335840, 29635200, 8, 840, 30240, 588000, 7056000, 53343360, 237081600, 479001600, 9, 1080, 45360, 1058400, 15876000, 160030080, 1066867200, 4311014400, 8083152000
Offset: 1
Examples
n=1 => AAAA -> T(1,4)=1 n=2 => AAAA,BBBB -> T(2,4)=2 AAAAB,AAABA,AABAA,ABAAA,BAAAA,BBBBA,BBBAB,BBABB,BABBB,ABBBB, AAABB,AABAB,AABBA,ABAAB,ABABA,ABBAA,BAAAB,BAABA,BABAA,BBAAA, BBBAA,BBABA,BBAAB,BABBA,BABAB,BAABB,ABBBA,ABBAB,ABABB,AABBB -> T(2,5)=30 Triangle begins: 1; 2, 30; 3, 90, 540; 4, 180, 2160, 8400; 5, 300, 5400, 42000, 126000; 6, 450, 10800, 126000, 756000, 1905120; 7, 630, 18900, 294000, 2646000, 13335840, 29635200; 8, 840, 30240, 588000, 7056000, 53343360, 237081600, 479001600; ...
Crossrefs
Main diagonal is A037961.
Formula
[binomial(k,4)+10*binomial(k,5)+15*binomial(k,6)]*n!/(n+3-k)!