cp's OEIS Frontend

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.

A281912 Number of sequences of balls colored with at most n colors such that exactly one ball is of a color seen earlier in the sequence.

This page as a plain text file.
%I A281912 #32 Sep 27 2017 09:31:08
%S A281912 1,8,57,424,3425,30336,294553,3123632,36003969,448816600,6022033721,
%T A281912 86587079448,1328753602657,21683227579664,375013198304025,
%U A281912 6853321766162656,131976208783240193,2671430511854158632,56709161712552286009,1259836187316759240200
%N A281912 Number of sequences of balls colored with at most n colors such that exactly one ball is of a color seen earlier in the sequence.
%C A281912 Note that any such sequence has at least 2 balls, and at most n+1
%C A281912 Number of 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 A281912 Jeremy Dover, <a href="/A281912/b281912.txt">Table of n, a(n) for n = 1..99</a>
%F A281912 a(n) = n! * Sum_{k=2..n+1} binomial(k,2)/(n+1-k)!.
%F A281912 a(n) = n if n < 2, a(n) = n*((n+2)/(n-1)*a(n-1) - a(n-2)) for n >= 2. - _Alois P. Heinz_, Feb 02 2017
%F A281912 a(n)/n! ~ e*n^2/2. - _Vaclav Kotesovec_, Feb 03 2017
%e A281912 n=1 => AA -> a(1) = 1.
%e A281912 n=2 => AA,BB,AAB,ABA,BAA,BBA,BAB,ABB -> a(2) = 8.
%p A281912 a:= proc(n) option remember;
%p A281912       `if`(n<2, 1, a(n-1)*(n+2)/(n-1)-a(n-2))*n
%p A281912     end:
%p A281912 seq(a(n), n=1..25);  # _Alois P. Heinz_, Feb 02 2017
%t A281912 Table[n!*Sum[Binomial[k, 2]/(n + 1 - k)!, {k, 2, n + 1}], {n, 20}] (* _Michael De Vlieger_, Feb 02 2017 *)
%Y A281912 Cf. A093964.
%Y A281912 Row sums of triangle A281881. - _Jeremy Dover_, Sep 26 2017
%K A281912 nonn
%O A281912 1,2
%A A281912 _Jeremy Dover_, Feb 01 2017