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.

A271731 Number of set partitions of [n] with maximal block length multiplicity equal to two.

This page as a plain text file.
%I A271731 #10 May 08 2018 06:22:23
%S A271731 1,0,9,25,70,406,2093,10935,41961,267751,1745040,9744384,60271016,
%T A271731 369277000,2981920373,19297914599,136978951579,1039245386419,
%U A271731 8924928983999,65392069094065,539711448752906,4489189106832134,39604974257078180,404561197077466250
%N A271731 Number of set partitions of [n] with maximal block length multiplicity equal to two.
%C A271731 At least one block length occurs exactly 2 times, and all block lengths occur at most 2 times.
%H A271731 Alois P. Heinz, <a href="/A271731/b271731.txt">Table of n, a(n) for n = 2..648</a>
%H A271731 Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a>
%p A271731 with(combinat):
%p A271731 b:= proc(n, i, k) option remember; `if`(n=0, 1,
%p A271731       `if`(i<1, 0, add(multinomial(n, n-i*j, i$j)
%p A271731         *b(n-i*j, i-1, k)/j!, j=0..min(k, n/i))))
%p A271731     end:
%p A271731 a:= n-> b(n$2, 2)-b(n$2, 1):
%p A271731 seq(a(n), n=2..30);
%t A271731 multinomial[n_, k_List] := n!/Times @@ (k!);
%t A271731 b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[multinomial[n, Join[{n - i*j}, Table[i, j]]]*b[n - i*j, i - 1, k]/j!, {j, 0, Min[k, n/i] }]]];
%t A271731 a[n_] := b[n, n, 2] - b[n, n, 1];
%t A271731 Table[a[n], {n, 2, 30}] (* _Jean-François Alcover_, May 08 2018, after _Alois P. Heinz_ *)
%Y A271731 Column k=2 of A271423.
%K A271731 nonn
%O A271731 2,3
%A A271731 _Alois P. Heinz_, Apr 13 2016