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.

A238342 Triangle T(n,k) read by rows: T(n,k) is the number of compositions of n with exactly k occurrences of the smallest part, n>=0, 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 3, 0, 1, 0, 3, 4, 0, 1, 0, 8, 3, 4, 0, 1, 0, 11, 10, 5, 5, 0, 1, 0, 20, 18, 14, 5, 6, 0, 1, 0, 34, 35, 24, 21, 6, 7, 0, 1, 0, 59, 60, 59, 35, 27, 7, 8, 0, 1, 0, 96, 121, 108, 85, 49, 35, 8, 9, 0, 1, 0, 167, 217, 213, 175, 125, 63, 44, 9, 10, 0, 1, 0, 282, 391, 419, 366, 258, 176, 80, 54, 10, 11, 0, 1
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 25 2014

Keywords

Comments

Conjecture: Generally, for k > 0 is a(n) ~ n^k * ((1+sqrt(5))/2)^(n-2*k-1) / (5^((k+1)/2) * k!). Holds for all k<=10. - Vaclav Kotesovec, May 02 2014
G.f.: 1 + Sum_{i>0} (-y*(x^i)*(x - 1)^2)/( (x^(i+1) + x - 1)*((x^i)*(x*(y - 1) - y) - x + 1) ). - John Tyler Rascoe, Oct 15 2024
Sum_{k=0..n} k * T(n,k) = A097941(n). - Alois P. Heinz, Oct 15 2024

Examples

			Triangle starts:
00:  1;
01:  0,    1;
02:  0,    1,    1;
03:  0,    3,    0,    1;
04:  0,    3,    4,    0,    1;
05:  0,    8,    3,    4,    0,    1;
06:  0,   11,   10,    5,    5,    0,    1;
07:  0,   20,   18,   14,    5,    6,    0,    1;
08:  0,   34,   35,   24,   21,    6,    7,    0,   1;
09:  0,   59,   60,   59,   35,   27,    7,    8,   0,   1;
10:  0,   96,  121,  108,   85,   49,   35,    8,   9,   0,   1;
11:  0,  167,  217,  213,  175,  125,   63,   44,   9,  10,   0,  1;
12:  0,  282,  391,  419,  366,  258,  176,   80,  54,  10,  11,  0,  1;
13:  0,  475,  709,  808,  730,  579,  371,  236,  99,  65,  11, 12,  0,  1;
14:  0,  800, 1281, 1522, 1481, 1202,  861,  513, 309, 120,  77, 12, 13,  0, 1;
15:  0, 1352, 2283, 2872, 2925, 2512, 1862, 1238, 684, 395, 143, 90, 13, 14, 0, 1;
...
		

Crossrefs

Cf. A238341 (the same for largest part).
Row sums are A011782.
T(2*n,n) gives A232665(n).
Cf. A097941.

Programs

  • Maple
    b:= proc(n, s) option remember;`if`(n=0, 1,
          `if`(n`if`(k=0, `if`(n=0, 1, 0), add((p->add(coeff(p, x, i)*
         binomial(i+k, k), i=0..degree(p)))(b(n-j*k, j+1)), j=1..n/k)):
    seq(seq(T(n, k), k=0..n), n=0..15);
  • Mathematica
    b[n_, s_] := b[n, s] = If[n == 0, 1, If[nJean-François Alcover, Nov 07 2014, translated from Maple *)
  • PARI
    T_xy(max_row) = {my(N=max_row+1, x='x+O('x^N), h=1+sum(i=1,N,(-y*(x^i)*(x-1)^2)/((x^(i+1)+x-1)*((x^i)*(x*(y-1)-y)-x+1)))); for(i=0,N-1, print(Vecrev(polcoef(h,i))))}
    T_xy(15) \\ John Tyler Rascoe, Oct 15 2024

A242447 Number T(n,k) of compositions of n in which the maximal multiplicity of parts equals k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 3, 0, 1, 0, 3, 4, 0, 1, 0, 5, 6, 4, 0, 1, 0, 11, 10, 5, 5, 0, 1, 0, 13, 21, 18, 5, 6, 0, 1, 0, 19, 40, 34, 21, 6, 7, 0, 1, 0, 27, 87, 59, 40, 27, 7, 8, 0, 1, 0, 57, 121, 132, 100, 49, 35, 8, 9, 0, 1, 0, 65, 219, 272, 210, 131, 63, 44, 9, 10, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, May 15 2014

Keywords

Comments

T(0,0) = 1 by convention. T(n,k) counts the compositions of n in which at least one part has multiplicity k and no part has a multiplicity larger than k.

Examples

			T(6,1) = 11: [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1], [2,4], [4,2], [1,5], [5,1], [6].
T(6,2) = 10: [1,1,2,2], [1,2,1,2], [1,2,2,1], [2,1,1,2], [2,1,2,1], [2,2,1,1], [3,3], [1,1,4], [1,4,1], [4,1,1].
T(6,3) = 5: [2,2,2], [1,1,1,3], [1,1,3,1], [1,3,1,1], [3,1,1,1].
T(6,4) = 5: [1,1,1,1,2], [1,1,1,2,1], [1,1,2,1,1], [1,2,1,1,1], [2,1,1,1,1].
T(6,6) = 1: [1,1,1,1,1,1].
Triangle T(n,k) begins:
  1;
  0,  1;
  0,  1,   1;
  0,  3,   0,   1;
  0,  3,   4,   0,   1;
  0,  5,   6,   4,   0,  1;
  0, 11,  10,   5,   5,  0,  1;
  0, 13,  21,  18,   5,  6,  0, 1;
  0, 19,  40,  34,  21,  6,  7, 0, 1;
  0, 27,  87,  59,  40, 27,  7, 8, 0, 1;
  0, 57, 121, 132, 100, 49, 35, 8, 9, 0, 1;
		

Crossrefs

Columns k=0-10 give: A000007, A032020 (for n>0), A243119, A243120, A243121, A243122, A243123, A243124, A243125, A243126, A243127.
T(2n,n) = A232665(n).
Row sums give A011782.
Cf. A242451 (the same for minimal multiplicity).

Programs

  • Maple
    b:= proc(n, i, p, k) option remember; `if`(n=0, p!, `if`(i<1, 0,
          add(b(n-i*j, i-1, p+j, k)/j!, j=0..min(n/i, k))))
        end:
    T:= (n, k)-> b(n$2, 0, k) -`if`(k=0, 0, b(n$2, 0, k-1)):
    seq(seq(T(n, k), k=0..n), n=0..14);
  • Mathematica
    b[n_, i_, p_, k_] := b[n, i, p, k] = If[n == 0, p!, If[i<1, 0, Sum[b[n - i*j, i-1, p + j, k]/j!, {j, 0, Min[n/i, k]}]]]; T[n_, k_] := b[n, n, 0, k] - If[k == 0, 0, b[n, n, 0, k-1]]; Table[Table[T[n, k], {k, 0, n}], {n, 0, 14}] // Flatten (* Jean-François Alcover, Jan 22 2015, after Alois P. Heinz *)

A232605 Number of compositions of 2n into parts with multiplicity <= n.

Original entry on oeis.org

1, 1, 7, 26, 114, 459, 1892, 7660, 31081, 125464, 506025, 2036706, 8189555, 32894825, 132033140, 529614616, 2123365038, 8509634259, 34092146068, 136546197412, 546774790297, 2189060331762, 8762770476060, 35072837719356, 140363923730474, 561697985182654
Offset: 0

Views

Author

Alois P. Heinz, Nov 26 2013

Keywords

Comments

a(n) = A243081(2n,n) = Sum_{i=0..n} A242447(2n,i).

Examples

			a(1) = 1: [2].
a(2) = 7: [4], [3,1], [2,2], [1,3], [2,1,1], [1,2,1], [1,1,2].
a(3) = 26: [6], [5,1], [4,2], [3,3], [2,4], [1,5], [3,2,1], [2,3,1], [1,4,1], [3,1,2], [2,2,2], [1,3,2], [2,1,3], [1,2,3], [1,1,4], [4,1,1], [2,1,2,1], [1,2,2,1], [1,1,3,1], [3,1,1,1], [2,2,1,1], [1,1,2,2], [1,1,1,3], [1,3,1,1], [2,1,1,2], [1,2,1,2].
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember;
         `if`(n<5, [1, 1, 7, 26, 114][n+1],
          (2*(n-1)*(11092322562903*n^3 -66692687083623*n^2
           +117736395568913*n -51473509383358) *a(n-1)
          -(17386283060104*n^4 -178154697569624*n^3 +652039987731328*n^2
           -984836231488344*n +485931992440304) *a(n-2)
          -(89948343833304*n^4 -664733317200192*n^3 +1662507315916082*n^2
           -1594206267597886*n +485625773146800) *a(n-3)
          +(92866735410328*n^4 -1047423564207444*n^3 +4160804083968884*n^2
           -6634447008138888*n +3217864137236880) *a(n-4)
          -16*(n-5)*(2*n-9)*(310469340359*n^2 -847919784312*n
           +494768703748) *a(n-5)) / (5*n*(n-1)*
          (681426847222*n^2 -3587414825361*n +4663189129034)))
        end:
    seq(a(n), n=0..40);
  • Mathematica
    b[n_, i_, p_, k_] := b[n, i, p, k] = If[n == 0, p!, If[i < 1, 0, Sum[b[n - i*j, i - 1, p + j, k]/j!, {j, 0, Min[n/i, k]}]]];
    A[n_, k_] := If[k >= n, If[n == 0, 1, 2^(n - 1)], b[n, n, 0, k]];
    a[n_] := A[2 n, n];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Mar 31 2017, after Alois P. Heinz *)

Formula

Recurrence: 5*(n-2)*(n-1)*n*(1258*n^4 - 11230*n^3 + 37013*n^2 - 53645*n + 28764)*a(n) = 2*(n-2)*(n-1)*(17612*n^5 - 159736*n^4 + 538872*n^3 - 824111*n^2 + 541051*n - 107568)*a(n-1) - 4*(n-2)*(5032*n^5 - 44925*n^4 + 134332*n^3 - 137541*n^2 - 6614*n + 52596)*a(n-2) - 2*(83028*n^7 - 1074550*n^6 + 5758938*n^5 - 16516699*n^4 + 27297714*n^3 - 25934731*n^2 + 13070460*n - 2661120)*a(n-3) + 8*(n-4)*(n-1)*(2*n-7)*(1258*n^4 - 6198*n^3 + 10871*n^2 - 8277*n + 2160)*a(n-4). - Vaclav Kotesovec, Nov 27 2013
a(n) ~ 2^(2*n-1). - Vaclav Kotesovec, Nov 27 2013

A332051 Number of compositions of 2n where the multiplicity of the first part equals n.

Original entry on oeis.org

1, 1, 3, 4, 15, 36, 126, 372, 1239, 3910, 12848, 41581, 136578, 447188, 1473342, 4855704, 16053831, 53138244, 176233968, 585202262, 1945964080, 6478043121, 21588979877, 72016891509, 240452892570, 803489258286, 2686964354376, 8991840800137, 30110638705890
Offset: 0

Views

Author

Alois P. Heinz, Feb 06 2020

Keywords

Examples

			a(0) = 1: the empty composition.
a(1) = 1: 2.
a(2) = 3: 22, 112, 121.
a(3) = 4: 222, 1113, 1131, 1311.
a(4) = 15: 2222, 11114, 11141, 11411, 14111, 111122, 111212, 111221, 112112, 112121, 112211, 121112, 121121, 121211, 122111.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, x, add(expand(
         `if`(i=j, x, 1)*b(n-j, `if`(n `if`(n=0, 1, coeff(add(b(2*n-j, j), j=1..2*n), x, n)):
    seq(a(n), n=0..35);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, x, Sum[Expand[If[i == j, x, 1] b[n - j, If[n < i + j, 0, i]]], {j, 1, n}]];
    a[n_] := If[n == 0, 1, Coefficient[Sum[b[2 n - j, j], {j, 1, 2 n}], x, n]];
    a /@ Range[0, 35] (* Jean-François Alcover, Dec 20 2020, after Alois P. Heinz *)

Formula

a(n) = A331332(2n,n).
a(n) ~ c * d^n / sqrt(Pi*n), where d = 3.40869819984215108586487649733361214893... is the root of the equation 4 - 32*d - 8*d^2 + 5*d^3 = 0, and c = 0.34930509632919368540449993196290415079... is the root of the equation 5 - 4*c^2 - 592*c^4 + 2368*c^6 = 0. - Vaclav Kotesovec, Feb 08 2020
Recurrence: 5*(n-1)*n*(2294*n^5 - 31267*n^4 + 168064*n^3 - 445121*n^2 + 580494*n - 297864)*a(n) = (n-1)*(29822*n^6 - 415647*n^5 + 2327634*n^4 - 6668807*n^3 + 10238782*n^2 - 7910608*n + 2368800)*a(n-1) + 2*(27528*n^7 - 434848*n^6 + 2851985*n^5 - 10024036*n^4 + 20278349*n^3 - 23438626*n^2 + 14189888*n - 3420000)*a(n-2) - 2*(41292*n^7 - 647684*n^6 + 4218357*n^5 - 14743832*n^4 + 29759871*n^3 - 34533464*n^2 + 21199620*n - 5259600)*a(n-3) + 2*(n-4)*(2*n - 7)*(2294*n^5 - 19797*n^4 + 65936*n^3 - 105591*n^2 + 80846*n - 23400)*a(n-4). - Vaclav Kotesovec, Feb 08 2020
Showing 1-4 of 4 results.