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.

Showing 1-4 of 4 results.

A077042 Square array read by falling antidiagonals of central polynomial coefficients: largest coefficient in expansion of (1 + x + x^2 + ... + x^(n-1))^k = ((1-x^n)/(1-x))^k, i.e., the coefficient of x^floor(k*(n-1)/2) and of x^ceiling(k*(n-1)/2); also number of compositions of floor(k*(n+1)/2) into exactly k positive integers each no more than n.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 1, 0, 1, 3, 3, 1, 1, 0, 1, 6, 7, 4, 1, 1, 0, 1, 10, 19, 12, 5, 1, 1, 0, 1, 20, 51, 44, 19, 6, 1, 1, 0, 1, 35, 141, 155, 85, 27, 7, 1, 1, 0, 1, 70, 393, 580, 381, 146, 37, 8, 1, 1, 0, 1, 126, 1107, 2128, 1751, 780, 231, 48, 9, 1, 1, 0, 1, 252, 3139
Offset: 0

Views

Author

Henry Bottomley, Oct 22 2002

Keywords

Comments

From Michel Marcus, Dec 01 2012: (Start)
A pair of numbers written in base n are said to be comparable if all digits of the first number are at least as big as the corresponding digit of the second number, or vice versa. Otherwise, this pair will be defined as uncomparable. A set of pairwise uncomparable integers will be called anti-hierarchic.
T(n,k) is the size of the maximal anti-hierarchic set of integers written with k digits in base n.
For example, for base n=2 and k=4 digits:
- 0 (0000) and 15 (1111) are comparable, while 6 (0110) and 9 (1001) are uncomparable,
- the maximal antihierarchic set is {3 (0011), 5 (0101), 6 (0110), 9 (1001), 10 (1010), 12 (1100)} with 6 elements that are all pairwise uncomparable. (End)

Examples

			Rows of square array start:
  1,    0,    0,    0,    0,    0,    0, ...
  1,    1,    1,    1,    1,    1,    1, ...
  1,    1,    2,    3,    6,   10,   20, ...
  1,    1,    3,    7,   19,   51,  141, ...
  1,    1,    4,   12,   44,  155,  580, ...
  1,    1,    5,   19,   85,  381, 1751, ...
  ...
Read by antidiagonals:
  1;
  0, 1;
  0, 1, 1;
  0, 1, 1, 1;
  0, 1, 2, 1, 1;
  0, 1, 3, 3, 1, 1;
  0, 1, 6, 7, 4, 1, 1;
  ...
		

Crossrefs

Programs

Formula

By the central limit theorem, T(n,k) is roughly n^(k-1)*sqrt(6/(Pi*k)).
T(n,k) = Sum{j=0,h/n} (-1)^j*binomial(k,j)*binomial(k-1+h-n*j,k-1) with h=floor(k*(n-1)/2), k>0. - Michel Marcus, Dec 01 2012

A077045 Doubly restricted composition numbers: number of compositions of 1+2+3+...+n = n(n+1)/2 into exactly n positive integers each no more than n.

Original entry on oeis.org

1, 1, 2, 7, 44, 381, 4332, 60691, 1012664, 19610233, 432457640, 10701243741, 293661065788, 8851373201919, 290711372717976, 10334165623697259, 395320344293410544, 16192709833199300337, 707125993042984343136, 32795665902734099555845, 1609908874238209683872480
Offset: 0

Views

Author

Henry Bottomley, Oct 22 2002

Keywords

Examples

			a(3) = 7 since the compositions of 1+2+3=6 into exactly 3 positive integers each no more than 3 are: 1+2+3, 1+3+2, 2+1+3, 2+2+2, 2+3+1, 3+1+2, 3+2+1.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, h, t) option remember;
          `if`(t*h b(n*(n-1)/2, n-1, n):
    seq(a(n), n=0..20);  # Alois P. Heinz, Apr 10 2012
  • Mathematica
    f[n_] := Union[ CoefficientList[ Expand[ Sum[x^j, {j, n}]^n], x]][[-1]]; Join[{1}, Array[f, 18]] (* Robert G. Wilson v, Apr 06 2012 *)
    f[n_] := Block[{ip = IntegerPartitions[n (n + 1)/2, {n}, Range@ n], k = 1, s = 0}, len = Length[ip] + 1; While[k < len, s = s + Length@ Permutations[ ip[[k]]]; k++]; s]; Array[f, 11, 0] (* CAUTION, very slow and requires a lot of resources beyond 10, Robert G. Wilson v, Apr 09 2012 *)
    b[n_, h_, t_] := b[n, h, t] = If[t*h < n, 0, If[n == 0, 1, Sum[b[n-j, Min[h, n-j], t-1], {j, 0, Min[n, h]}]]]; a[n_] := b[n*(n-1)/2, n-1, n]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Sep 16 2013, after Alois P. Heinz *)
    Table[Sum[Binomial[n, k] Binomial[n + Binomial[n, 2] - n k - 1, n - 1] (-1)^k, {k, 0, Floor[(n-1)/2] + If[n == 0, 1, 0]}], {n, 0, 100}] (* Emanuele Munarini, Jul 15 2016 *)
  • Maxima
    makelist(sum(binomial(n,k)*binomial(n+binomial(n,2)-n*k-1,n-1)*(-1)^k,k,0,floor((n-1)/2)), n, 1, 12); /* for n >= 1; Emanuele Munarini, Jul 15 2016 */
    
  • PARI
    a(n) = if(n<1,n==0,sum(k=0, (n-1)\2, binomial(n,k)*binomial(n + binomial(n,2) - n*k - 1, n-1)*(-1)^k)); \\ Andrew Howroyd, Feb 27 2018

Formula

a(n) = A077042(n, n). Roughly n^(n-3/2)*sqrt(6/Pi) by the central limit theorem and something like n^n*sqrt(6/(Pi*(n^3+0.3*n^2-0.91*n+0.3))) seems to be even closer.
From Emanuele Munarini, Jul 15 2016: (Start)
a(n) = [x^binomial(n,2)](1+x+x^2+...+x^(n-1))^n.
a(n) = Sum_{k = 0..floor((n-1)/2)} binomial(n,k)*binomial(n + binomial(n,2) - n*k - 1, n-1)*(-1)^k for n >=1. (End)

A077047 Doubly restricted composition numbers: number of compositions of floor(n(n+2)/2) into exactly n positive integers each no more than n+1.

Original entry on oeis.org

1, 1, 3, 12, 85, 780, 9331, 134512, 2306025, 45433800, 1018872811, 25506741084, 707972099627, 21518492021208, 712601187601395, 25491847538274240, 981272544393935569, 40392787067756440272, 1772592132899627652691
Offset: 0

Views

Author

Henry Bottomley, Oct 22 2002

Keywords

Comments

a(n) is the maximum number of ordered partitions when using n numbers each ranging from 0 to n. This maximum occurs when partitioning n^2/2 for n even, or (n^2 - 1)/2 or (n^2 + 1)/2 for n odd. Example for a(3)=12: the partitions of 4 are (1,1,2) and (0,2,2), each having 3 ordered arrangements, and (0,1,3) having 6 arrangements; hence 3+3+6=12. For 5 the partitions are (1,2,2) and (1,1,3), with 3 ordered arrangements each, and (0,2,3) having 6 arrangements. - J. M. Bergot, Jul 11 2015
Largest coefficient of (1 + x + x^2 + ... + x^n)^n. - Vaclav Kotesovec, Mar 26 2016

Examples

			a(3)=12 since the compositions of [3*5/2]=7 into exactly 3 positive integers each no more than 4 are 1+2+4, 1+3+3, 1+4+2, 2+1+4, 2+2+3, 2+3+2, 2+4+1, 3+1+3, 3+2+2, 3+3+2, 4+1+2, 4+2+1.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) if n::odd then coeff(add(x^i,i=0..n)^n,x,(n^2-1)/2)
    else coeff(add(x^i,i=0..n)^n,x,n^2/2) fi end proc:
    map(f, [$0..40]); # Robert Israel, Nov 16 2016
  • Mathematica
    Table[Max[CoefficientList[Expand[Sum[x^k, {k, 0, n}]^n], x]], {n, 0, 20}] (* Vaclav Kotesovec, Mar 26 2016 *)
    Table[Max[CoefficientList[((x^(n+1)-1)/(x-1))^n, x]], {n, 0, 20}] (* Vladimir Reshetnikov, Nov 16 2016 *)

Formula

a(n) = A077042(n+1, n).
a(n) ~ exp(1) * sqrt(6/Pi) * n^(n-3/2). - Vaclav Kotesovec, Mar 26 2016

A077048 Doubly restricted composition numbers: number of compositions of [n^2/2] into up to n positive integers each no more than n.

Original entry on oeis.org

1, 1, 2, 6, 44, 350, 4292, 57036, 996088, 18661152, 424241102, 10266964015, 287927722315, 8541887839459, 285144784116376, 10016752944160536, 388044155110294856, 15749295719801313452, 694726457246902921502
Offset: 0

Views

Author

Henry Bottomley, Oct 22 2002

Keywords

Examples

			a(3)=6 since the number of compositions of [3^2/2]=4 into up to 3 positive integers each no more than 3 are: 1+1+2, 1+2+1, 1+3, 2+1+1, 2+2, 3+1.
		

Crossrefs

Formula

Similar in magnitude to A077045.
Showing 1-4 of 4 results.