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.

A001681 The partition function G(n,4).

Original entry on oeis.org

1, 1, 2, 5, 15, 51, 196, 827, 3795, 18755, 99146, 556711, 3305017, 20655285, 135399720, 927973061, 6631556521, 49294051497, 380306658250, 3039453750685, 25120541332271, 214363100120051, 1885987611214092, 17085579637664715, 159185637725413675
Offset: 0

Views

Author

Keywords

Comments

Number of '12-3 and 321-4'-avoiding permutations.
Set partitions into sets of size at most 4. The e.g.f. for partitions into sets of size at most s is exp( sum(j=1..s, x^j/j!) ). [Joerg Arndt, Dec 07 2012]
Also called restricted Stirling numbers of the second kind (see Mezo). - N. J. A. Sloane, Nov 27 2013

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column k=4 of A229223.

Programs

  • Maple
    G:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
           add(G(n-i*j, i-1) *n!/i!^j/(n-i*j)!/j!, j=0..n/i)))
        end:
    a:= n-> G(n, 4):
    seq(a(n), n=0..30);  # Alois P. Heinz, Apr 20 2012
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 1, add(
           a(n-i)*binomial(n-1, i-1), i=1..min(n, 4)))
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Sep 22 2016
    # Recurrence:
    rec := {(-n^3-6*n^2-11*n-6)*f(n) + (-3*n^2-15*n-18)*f(n+1) + (-6*n-18)*f(n+2) - 6*f(n+3) + 6*f(n+4)=0, f(0)=1, f(1)=1, f(2)=2, f(3)=5}:
    aList := gfun:-rectoproc(rec, f(n), list): aList(24); # Peter Luschny, Feb 26 2018
  • Mathematica
    g[n_, k_] := g[n, k] = If[n == 0, 1, If[k<1, 0, Sum[g[n-k*j, k-1]*n!/k!^j/(n-k*j)!/j!, {j, 0, n/k}]]]; Table[g[n, 4], {n, 0, 24}] (* Jean-François Alcover, Mar 11 2014, after Alois P. Heinz *)
  • PARI
    A001681(n)=n!*sum(k=1,n, 1/k!*sum(j=0,k, binomial(k,j)*sum(i=j,n-k+j, binomial(j,i-j)*binomial(k-j,n-3*k+3*j-i)*2^(5*k-4*j+i-2*n)*3^(j-k))));
    vector(33,n,A001681(n-1)) /* Joerg Arndt, Jan 25 2011 */
    
  • PARI
    x='x+O('x^66); Vec(serlaplace(exp(sum(j=1,4,x^j/j!)))) \\ Joerg Arndt, Mar 11 2014

Formula

E.g.f.: exp( x + x^2/2 + x^3/6 + x^4/24 ). - Ralf Stephan, Apr 22 2004
a(n) = n! * sum(k=1..n, 1/k! * sum(j=0..k, C(k,j) * sum(i=j..n-k+j, C(j,i-j) * C(k-j,n-3*k+3*j-i) * 2^(5*k-4*j+i-2*n) * 3^(j-k)))). [Vladimir Kruchinin, Jan 25 2011]
a(n) = G(n,4) with G(0,i) = 1, G(n,i) = 0 for n>0 and i<1, otherwise G(n,i) = Sum_{j=0..floor(n/i)} G(n-i*j,i-1) * n!/(i!^j*(n-i*j)!*j!). - Alois P. Heinz, Apr 20 2012
Recurrence: 6*a(n) = 6*a(n-1) + 6*(n-1)*a(n-2) + 3*(n-2)*(n-1)*a(n-3) + (n-3)*(n-2)*(n-1)*a(n-4). - Vaclav Kotesovec, Sep 15 2013
a(n) ~ n^(3*n/4)*exp(31*(6*n)^(1/4)/64 + 5*sqrt(6*n)/16 + (6*n)^(3/4)/6 - 3*n/4 - 21/32)/(2*6^(n/4)) * (1 + 1599*6^(3/4)/(40960*n^(1/4)) + 280873603/1677721600*sqrt(6/n) + 33870741297579 /240518168576000 *6^(1/4)/n^(3/4)). - Vaclav Kotesovec, Sep 15 2013

Extensions

More terms from Ralf Stephan, Apr 22 2004

A276921 Number A(n,k) of ordered set partitions of [n] with at most k elements per block; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 2, 0, 1, 1, 3, 6, 0, 1, 1, 3, 12, 24, 0, 1, 1, 3, 13, 66, 120, 0, 1, 1, 3, 13, 74, 450, 720, 0, 1, 1, 3, 13, 75, 530, 3690, 5040, 0, 1, 1, 3, 13, 75, 540, 4550, 35280, 40320, 0, 1, 1, 3, 13, 75, 541, 4670, 45570, 385560, 362880, 0
Offset: 0

Views

Author

Alois P. Heinz, Sep 22 2016

Keywords

Examples

			Square array A(n,k) begins:
  1,    1,     1,     1,     1,     1,     1,     1, ...
  0,    1,     1,     1,     1,     1,     1,     1, ...
  0,    2,     3,     3,     3,     3,     3,     3, ...
  0,    6,    12,    13,    13,    13,    13,    13, ...
  0,   24,    66,    74,    75,    75,    75,    75, ...
  0,  120,   450,   530,   540,   541,   541,   541, ...
  0,  720,  3690,  4550,  4670,  4682,  4683,  4683, ...
  0, 5040, 35280, 45570, 47110, 47278, 47292, 47293, ...
		

Crossrefs

Main diagonal gives A000670.
Cf. A276922.

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(n=0, 1, add(
           A(n-i, k)*binomial(n, i), i=1..min(n, k)))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    A[n_, k_] := A[n, k] = If[n==0, 1, Sum[A[n-i, k]*Binomial[n, i], {i, 1, Min[n, k]}]]; Table[A[n, d-n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Feb 03 2017, translated from Maple *)

Formula

E.g.f. of column k: 1/(1-Sum_{i=1..k} x^i/i!).
A(n,k) = Sum_{j=0..k} A276922(n,j).

A320760 Number of ordered set partitions of [n] where the maximal block size equals four.

Original entry on oeis.org

1, 10, 120, 1540, 21490, 326970, 5402250, 96500250, 1855334250, 38228190000, 840776937000, 19666511865000, 487617137007000, 12776791730703000, 352825452012033000, 10242418813814187000, 311854958169459705000, 9937942309809373860000, 330821844137019184950000
Offset: 4

Views

Author

Alois P. Heinz, Oct 20 2018

Keywords

Crossrefs

Column k=4 of A276922.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1, add(
          b(n-i, k)*binomial(n, i), i=1..min(n, k)))
        end:
    a:= n-> (k-> b(n, k) -b(n, k-1))(4):
    seq(a(n), n=4..25);
  • Mathematica
    b[n_, k_] := b[n, k] = If[n == 0, 1, Sum[b[n - i, k] Binomial[n, i], {i, 1, Min[n, k]}]];
    a[n_] := With[{k = 4}, b[n, k] - b[n, k-1]];
    a /@ Range[4, 25] (* Jean-François Alcover, Dec 14 2020, after Alois P. Heinz *)

Formula

E.g.f.: 1/(1-Sum_{i=1..4} x^i/i!) - 1/(1-Sum_{i=1..3} x^i/i!).
a(n) = A276924(n) - A189886(n).

A320761 Number of ordered set partitions of [n] where the maximal block size equals five.

Original entry on oeis.org

1, 12, 168, 2464, 38808, 657972, 11997216, 234594360, 4903616718, 109205019924, 2582909885556, 64686057980544, 1710536977653504, 47637803779229664, 1393903719674129664, 42758329987344875904, 1372254504736418142840, 45989719374155059863360
Offset: 5

Views

Author

Alois P. Heinz, Oct 20 2018

Keywords

Crossrefs

Column k=5 of A276922.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1, add(
          b(n-i, k)*binomial(n, i), i=1..min(n, k)))
        end:
    a:= n-> (k-> b(n, k) -b(n, k-1))(5):
    seq(a(n), n=5..25);
  • Mathematica
    b[n_, k_] := b[n, k] = If[n == 0, 1, Sum[b[n - i, k] Binomial[n, i], {i, 1, Min[n, k]}]];
    a[n_] := With[{k = 5}, b[n, k] - b[n, k-1]];
    a /@ Range[5, 25] (* Jean-François Alcover, Dec 14 2020, after Alois P. Heinz *)

Formula

E.g.f.: 1/(1-Sum_{i=1..5} x^i/i!) - 1/(1-Sum_{i=1..4} x^i/i!).
a(n) = A276925(n) - A276924(n).

A355294 Expansion of e.g.f. 1 / (1 - x - x^2/2 - x^3/3 - x^4/4).

Original entry on oeis.org

1, 1, 3, 14, 88, 670, 6170, 66360, 815640, 11272800, 173132400, 2925014400, 53909394000, 1076365290000, 23144112591600, 533193460800000, 13102608591072000, 342105146182800000, 9457689380931792000, 275988880808825184000, 8477631163592791200000, 273430368958004818560000, 9238944655686318693120000
Offset: 0

Views

Author

Ilya Gutkovskiy, Jun 27 2022

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 22; CoefficientList[Series[1/(1 - x - x^2/2 - x^3/3 - x^4/4), {x, 0, nmax}], x] Range[0, nmax]!
    a[0] = a[1] = 1; a[2] = 3; a[3] = 14; a[n_] := a[n] = n a[n - 1] + n (n - 1) a[n - 2]/2 + n (n - 1) (n - 2) a[n - 3]/3 + n (n - 1) (n - 2) (n - 3) a[n - 4]/4; Table[a[n], {n, 0, 22}]

Formula

a(n) = n * a(n-1) + n * (n-1) * a(n-2) / 2 + n * (n-1) * (n-2) * a(n-3) / 3 + n * (n-1) * (n-2) * (n-3) * a(n-4) / 4.

A365293 a(n) = n!*tetranacci(n+3).

Original entry on oeis.org

1, 1, 4, 24, 192, 1800, 20880, 282240, 4354560, 75479040, 1455148800, 30855686400, 713712384000, 17884003737600, 482619020083200, 13954193180928000, 430360865206272000, 14102295149150208000, 489295008086556672000, 17919783031425859584000
Offset: 0

Views

Author

Enrique Navarrete, Aug 31 2023

Keywords

Comments

a(n) is the number of ways to partition [n] into blocks of size at most 4, order the blocks, and order the elements within each block.

Examples

			a(5) = 1800 since the number of ways to partition [5] into blocks of size at most 4, order the blocks, and order the elements within each block are the following:
1) 1234,5: 10 such ordered blocks; 240 ways;
2) 123,4,5: 60 such ordered blocks; 360 ways;
3) 123,45: 20 such ordered blocks; 240 ways;
4) 12,34,5: 90 such ordered blocks; 360 ways;
5) 12,3,4,5: 240 such ordered blocks; 480 ways;
6) 1,2,3,4,5: 120 such ordered blocks; 120 ways.
		

Crossrefs

Programs

  • Mathematica
    Table[n! SeriesCoefficient[1/(1-x-x^2-x^3-x^4),{x,0,n}],{n,0,19}] (* Stefano Spezia, Aug 31 2023 *)

Formula

E.g.f.: 1/(1-x-x^2-x^3-x^4).
a(n) = A000142(n) * A000078(n+3).
Showing 1-6 of 6 results.