A247651 Maximum number of binary strings of length 2n obtained from a partition of n.
1, 2, 3, 12, 30, 60, 210, 840, 2520, 7560, 27720, 83160, 240240, 840840, 2702700, 10810800, 36756720, 122522400, 465585120, 1551950400, 4888643760, 19554575040, 74959204320, 257002986240, 936990054000, 3480248772000, 11745839605500, 40477970332800, 146732642456400, 524045151630000
Offset: 0
Keywords
Examples
n=0 gives the empty string. n=1 and the only possible partition generate 01 and 10. For n=2, both possible partitions generate 3 strings (0011,0110 and 1100, and respectively 0101, 1001 and 1010, based on runs of 1's). For n=3, the optimal partition is {1,2}, generating 12 strings (based on runs of 1's: 001011, 001101, 010011, 010110, 011001, 011010, 100011, 100110, 101100, 110001, 110010, 110100).
Programs
-
Mathematica
nseq[p_]:=FactorialPower[Total[p]+1,Length[p]]/Apply[Times,Map[Factorial[Count[p,#1]]&,Range[Max[Length[p]]]]]; a[n_]:=Max[Map[nseq,IntegerPartitions[n]]] Table[a[n],{n,0,20}] (* after A130670 *)
Formula
a(n) = (n+1)*A130760(n).
a(n) = Max[(n+1)!/(Prod_j(m_j!)(n-m+1)!)] over all partitions of n.
Extensions
More terms from Michel Marcus, May 19 2025
Comments