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 A292998 #21 Jan 10 2018 15:19:37 %S A292998 1,10,87,772,7285,74046,812875,9626632,122643657,1675253170, %T A292998 24449818591,379984902540,6268557335677,109443030279142, %U A292998 2016658652491155,39119860206021136,797013832285599505,17017679492994949722,380045072079456330727 %N A292998 Number of sequences of balls colored with at most n colors such that exactly three balls are the same color as some other ball in the sequence. %C A292998 Note that any such sequence has at least 3 balls and at most n+2, and that three matching balls must all be the same color. %H A292998 Jeremy M. Dover, <a href="https://arxiv.org/abs/1710.06049">Repetition in Colored Sequences of Balls</a>, arXiv:1710.06049 [math.CO], 2017. %F A292998 a(n) = n! * Sum_{k=3..n+2} binomial(k,3)/(n+2-k)!. %e A292998 For n=2 colors a, b, the a(n)=10 sequences of balls are: aaa, bbb, abbb, babb, bbab, bbba, baaa, abaa, aaba, aaab. %t A292998 Table[n!*Sum[Binomial[k, 3]/(n + 2 - k)!, {k, 3, n + 2}], {n, 19}] (* _Michael De Vlieger_, Sep 28 2017 *) %o A292998 (PARI) a(n) = n! * sum(k=3, n+2, binomial(k,3)/(n+2-k)!); \\ _Michel Marcus_, Sep 29 2017 %Y A292998 Row sums of triangle A292930. %Y A292998 Cf. A281912, A292999. %K A292998 nonn %O A292998 1,2 %A A292998 _Jeremy Dover_, Sep 27 2017