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-6 of 6 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)

A077046 Doubly restricted composition numbers: number of compositions of [n^2/2] into exactly n positive integers each strictly less than n.

Original entry on oeis.org

0, 1, 3, 19, 155, 1751, 24017, 398567, 7635987, 167729959, 4123838279, 112835748609, 3386455204288, 110976634957761, 3932912125462725, 150186639579545295, 6137695417757646851, 267654541150392845543, 12391407810082341898091, 607584722159224093306229
Offset: 1

Views

Author

Henry Bottomley, Oct 22 2002

Keywords

Examples

			a(3) = 3 since the compositions of [3^2/2]=4 into exactly 3 positive integers each strictly less than 3 are: 1+1+2, 1+2+1 and 2+1+1.
		

Crossrefs

Formula

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

A270918 Largest coefficient of (1+x+...+x^n)^(2*n).

Original entry on oeis.org

1, 2, 19, 580, 38165, 4395456, 786588243, 202384723528, 70886845397481, 32458256583753952, 18832730699014127291, 13507852690353224821652, 11738630472138500287398379, 12155701820213424461220851360, 14790850878997102285050287114419
Offset: 0

Views

Author

Vaclav Kotesovec, Mar 26 2016

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Max[CoefficientList[Expand[Sum[x^k, {k, 0, n}]^(2n)], x]], {n, 0, 20}]
  • PARI
    a(n) = vecmax(Vec((sum(k=0,n,x^k))^(2*n))); \\ Michel Marcus, Apr 01 2016

Formula

a(n) ~ exp(2) * sqrt(3/Pi) * n^(2*n - 3/2).

Extensions

Typo in formula corrected by Vaclav Kotesovec, Dec 10 2021

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.

A369767 Maximal coefficient of Product_{i=1..n} Sum_{j=0..n} x^(i*j).

Original entry on oeis.org

1, 1, 2, 6, 31, 231, 2347, 29638, 449693, 7976253, 162204059, 3722558272, 95221978299, 2687309507102, 82967647793153, 2782190523572392, 100715040802229833, 3914979746952224303, 162662679830709439637, 7194483479557973730982, 337519906320930133470189
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 31 2024

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> max(coeffs(expand(mul(add(x^(i*j), j=0..n), i=1..n)))):
    seq(a(n), n=0..20);  # Alois P. Heinz, Jan 31 2024
  • Mathematica
    Table[Max[CoefficientList[Product[Sum[x^(i j), {j, 0, n}], {i, 1, n}], x]], {n, 0, 20}]
  • PARI
    a(n) = vecmax(Vec(prod(i=1, n, sum(j=0, n, x^(i*j))))); \\ Michel Marcus, Jan 31 2024
    
  • Python
    from collections import Counter
    def A369767(n):
        c = {j:1 for j in range(n+1)}
        for i in range(2,n+1):
            d = Counter()
            for k in c:
                for j in range(0,i*n+1,i):
                    d[j+k] += c[k]
            c = d
        return max(c.values()) # Chai Wah Wu, Jan 31 2024
Showing 1-6 of 6 results.